Libevent integration for OpenSSL compatibility layer#10158
Libevent integration for OpenSSL compatibility layer#10158Roy-Carter wants to merge 8 commits intowolfSSL:masterfrom
Conversation
|
Can one of the admins verify this patch? |
|
@Roy-Carter - I sent you a contributor agreement form in our support portal. We can proceed with this PR after it has been accepted. |
|
@Roy-Carter is an approved contributor. |
|
Hey @julek-wolfssl I see 2 tests were cancelled due to a failed setup : Is that on purpose or some issue within the workflow ? |
|
@Roy-Carter please rebase to master and fix conflicts. |
5f528e4 to
52bb641
Compare
|
@julek-wolfssl rebased the commits on master |
|
Okay to test |
|
Hey @julek-wolfssl will you be able to attach log errors here too? |
|
Retest this please history lost. |
There was a problem hiding this comment.
Don't modify this file. The libevent build script should be modified to link against wolfSSL instead.
There was a problem hiding this comment.
how do you suggest handling it ?
when compiling libevents it requires the openssl.pc files , currently I did this hack to "make it work" but shouldn't we want to do here something that'll enable the smooth integration with libevent that seem to expect openssl usage ?
There was a problem hiding this comment.
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 asBIO_get_initin the OpenSSL compatibility headers. - Add libevent-only OpenSSL internal struct-tag compatibility macros in
wolfssl/openssl/ssl.h. - Introduce
--enable-libeventconfigure flag and install-time symlinks foropenssl/headers,libssl/libcrypto, andopenssl.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.
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