Skip to content

Libevent integration for OpenSSL compatibility layer#10158

Merged
douzzer merged 1 commit intowolfSSL:masterfrom
Roy-Carter:feature/libevent_integration
Apr 29, 2026
Merged

Libevent integration for OpenSSL compatibility layer#10158
douzzer merged 1 commit intowolfSSL:masterfrom
Roy-Carter:feature/libevent_integration

Conversation

@Roy-Carter
Copy link
Copy Markdown
Contributor

Description

Part of integrating wolfSSL as an OpenSSL replacement for the third-party library libevent. libevent hardcodes OpenSSL internal struct tags (ssl_st, ssl_ctx_st, bio_st, etc.) in forward declarations, so struct tag compatibility defines were added to wolfssl/openssl/ssl.h. Additionally, BIO_get_init was missing from the wolfSSL API - libevent calls it on custom BIO methods so wolfSSL_BIO_get_init was implemented.
A new --enable-libevent configure option installs OpenSSL drop-in symlinks for headers, libraries, and pkg-config.
Requires --enable-opensslall and --enable-opensslextra.

The bug which I fixed :

Testing

./configure --enable-libevent --enable-opensslall --enable-opensslextra && make - verified symlinks and pkg-config output.
./configure --enable-libevent alone - verified configure errors out requiring opensslall/opensslextra.
Built libevent against the resulting wolfssl install.

ontop of that I added a test for the newly added features:
test_wolfSSL_BIO_get_init

Checklist

  • [ *] added tests
  • [ *] updated/added doxygen

@wolfSSL-Bot
Copy link
Copy Markdown

Can one of the admins verify this patch?

@embhorn embhorn requested a review from julek-wolfssl April 8, 2026 12:31
@embhorn embhorn self-assigned this Apr 8, 2026
@embhorn
Copy link
Copy Markdown
Member

embhorn commented Apr 8, 2026

@Roy-Carter - I sent you a contributor agreement form in our support portal. We can proceed with this PR after it has been accepted.

@embhorn embhorn assigned Roy-Carter and unassigned embhorn Apr 8, 2026
@embhorn
Copy link
Copy Markdown
Member

embhorn commented Apr 8, 2026

@Roy-Carter is an approved contributor.

@Roy-Carter
Copy link
Copy Markdown
Contributor Author

Hey @julek-wolfssl I see 2 tests were cancelled due to a failed setup :
[6](https://github.com/wolfSSL/wolfssl/actions/runs/24162077504/job/70601434245?pr=10158#step:2:57) Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B] Get:2 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 gcc-11-base amd64 11.5.0-1ubuntu1~24.04.1 [45.6 kB] Get:3 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 cpp-11 amd64 11.5.0-1ubuntu1~24.04.1 [9999 kB] Error: The operation was canceled.

Is that on purpose or some issue within the workflow ?

@julek-wolfssl
Copy link
Copy Markdown
Member

@Roy-Carter please rebase to master and fix conflicts.

@Roy-Carter Roy-Carter force-pushed the feature/libevent_integration branch from 5f528e4 to 52bb641 Compare April 14, 2026 15:25
@Roy-Carter
Copy link
Copy Markdown
Contributor Author

@julek-wolfssl rebased the commits on master

@julek-wolfssl
Copy link
Copy Markdown
Member

Okay to test

@Roy-Carter
Copy link
Copy Markdown
Contributor Author

Hey @julek-wolfssl will you be able to attach log errors here too?

@julek-wolfssl
Copy link
Copy Markdown
Member

julek-wolfssl commented Apr 15, 2026

Retest this please history lost.

Comment thread Makefile.am
Comment thread wolfssl/openssl/ssl.h Outdated
Comment thread configure.ac
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds libevent-focused OpenSSL-compatibility improvements to wolfSSL, including struct-tag compatibility for forward declarations and a missing BIO accessor, plus an autotools option intended to install OpenSSL drop-in symlinks.

Changes:

  • Add wolfSSL_BIO_get_init() API and expose it as BIO_get_init in the OpenSSL compatibility headers.
  • Add libevent-only OpenSSL internal struct-tag compatibility macros in wolfssl/openssl/ssl.h.
  • Introduce --enable-libevent configure flag and install-time symlinks for openssl/ headers, libssl/libcrypto, and openssl.pc/libssl.pc/libcrypto.pc.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wolfssl/ssl.h Declares new wolfSSL_BIO_get_init() API.
src/bio.c Implements wolfSSL_BIO_get_init().
wolfssl/openssl/bio.h Maps BIO_get_init to wolfSSL_BIO_get_init.
wolfssl/openssl/ssl.h Adds libevent-only OpenSSL struct-tag compatibility defines.
tests/api/test_ossl_bio.h Registers new BIO init getter test.
tests/api/test_ossl_bio.c Adds test coverage for BIO_get_init behavior.
doc/dox_comments/header_files/ssl.h Adds doxygen for wolfSSL_BIO_set_init / wolfSSL_BIO_get_init.
configure.ac Adds --enable-libevent, related flags/conditionals, and dependency enforcement.
Makefile.am Adds install/uninstall hooks to create/remove OpenSSL drop-in symlinks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile.am Outdated
Comment thread Makefile.am Outdated
Comment thread configure.ac Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

MemBrowse Memory Report

No memory changes detected for:

Copy link
Copy Markdown
Member

@julek-wolfssl julek-wolfssl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its best for you to rebase to master and squash all the commits into one. Apart from that I like the changes.

Comment thread configure.ac
@Roy-Carter Roy-Carter force-pushed the feature/libevent_integration branch 2 times, most recently from d1641c6 to c9a5ad6 Compare April 21, 2026 16:03
…integration

Cosmetic: remove empty whitespace
@Roy-Carter Roy-Carter force-pushed the feature/libevent_integration branch from d538a13 to 6353ad3 Compare April 21, 2026 16:05
@Roy-Carter
Copy link
Copy Markdown
Contributor Author

@julek-wolfssl done

@Roy-Carter
Copy link
Copy Markdown
Contributor Author

@julek-wolfssl i see the PRB tests were not ran for some reason with "no test results found"

@dgarske
Copy link
Copy Markdown
Member

dgarske commented Apr 21, 2026

Jenkins retest this please

@douzzer douzzer merged commit c782db3 into wolfSSL:master Apr 29, 2026
453 of 454 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants