Skip to content

Add wolfSSL compatibility patches for 12 third-party projects - #362

Merged
philljj merged 17 commits into
wolfSSL:masterfrom
julek-wolfssl:osp-ports-2026-09
Dec 3, 2026
Merged

philljj merged 17 commits into
wolfSSL:masterfrom
julek-wolfssl:osp-ports-2026-09

Conversation

@julek-wolfssl

Copy link
Copy Markdown
Member

Add patches enabling wolfSSL support (or fixing existing wolfSSL support) across a batch of projects:

  • openldap 2.6.13: gate TLSCRLCheck on HAVE_WOLFSSL, fail tlso_ctx_init when CRL support is missing, fix channel binding digest via OBJ_find_sigid_algs
  • msmtp 1.8.32 (and update 1.8.28 patch): disable wolfSSL's automatic handshake peer verification when no tls_trust_file is set, set SSL_VERIFY_PEER explicitly
  • libvncserver 0.9.15: only use wolfSSL when no other TLS library is found; avoid leaking defines/include paths into OpenSSL builds; make pkg-config optional
  • jwt-cpp 0.7.2: add patch
  • net-snmp 5.9.5.2: document build/test steps (no patch needed, wolfSSL support ships upstream)
  • bind9 9.20.23: define HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY for wolfSSL, reject invalid --with-wolfssl=DIR values
  • libspdm 3.8.2: fix wolfSSL selection surviving a second cmake run, fail early without ENABLE_BINARY_BUILD=1, fix CSR generator's basicConstraints extension for wolfSSL
  • socat 1.8.1.1: fix subjectAltName IPv6/IPv4 ordering issue with wolfSSL, preserve config.h.in defines through autoheader
  • krb5 1.22.2: fix SPAKE plugin linking, wolfSSL log callback only in DEBUG_WOLFSSL builds, remove configure debug leftovers
  • libimobiledevice 1.4.0: fix extension building for wolfSSL (X509V3_EXT_nconf_nid, subject key identifier)
  • tcpdump 4.99.6: add --with-wolfssl=DIR to configure.ac, enable wolfSSL debug logging, handle --without-wolfssl/--with-crypto
  • python 3.14.5: add wolfSSL patch, build script, and README section; fix CRL fallback, IPADDR_MISMATCH, AIA extension handling
  • softhsm 2.7.0: skip RSA_SSL test under wolfSSL since it lacks NID_md5_sha1 support

The patch completes TLSCRLCheck under wolfSSL: bindconf_tls_defaults and
lloadd gate the CRL check on HAVE_WOLFSSL as well as HAVE_OPENSSL, so
syncrepl and proxy targets inherit it; tlso_ctx_init fails when wolfSSL
was built without CRL support instead of silently ignoring the option;
and the tls-server-end-point channel binding uses OBJ_find_sigid_algs so
SHA-384/512 signed certificates get the right digest. Requires wolfSSL
built with CRL support, which --enable-openldap now turns on.
wolfSSL verifies the peer certificate during the handshake while OpenSSL
leaves that to the application. msmtp does its own checking afterwards,
so an account without a tls_trust_file aborted the handshake. Both
patches turn the handshake verification off in that case and set
SSL_VERIFY_PEER explicitly otherwise, so the result does not depend on
the wolfSSL default. msmtp --version reports wolfSSL instead of "none".
wolfSSL is used only when no other TLS library was found. With OpenSSL
installed the wolfSSL block no longer injects its defines and include
paths into the OpenSSL build, and pkg-config is optional.
net-snmp 5.9.5 and newer ships wolfSSL support upstream, so no patch is
needed. Document the build and test steps in the README.
HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY is defined for wolfSSL because the
configure probe is skipped in the wolfSSL branch, and without it the isc
shim rewrote every HMAC key to EVP_PKEY_new_mac_key. A --with-wolfssl=DIR
value is rejected like for the other libraries instead of silently
building with OpenSSL.
The wolfSSL selection survives a second cmake run (CRYPTO was cached as
openssl) and cmake fails early when ENABLE_BINARY_BUILD is not 1. The
CSR generator builds the basicConstraints extension with
X509V3_EXT_nconf_nid(); wolfSSL only stubs X509V3_EXT_conf_nid().
The subjectAltName check skips IPv6 entries for an IPv4 peer name:
wolfSSL returns the stack in reverse order, so a certificate with an
IPv6 entry reached socat's IP comparison first, which resolved the IPv4
peer name with an AF_INET6 hint and died on the failed lookup (test 402
whenever testalt.crt carried ::1). An AH_BOTTOM block keeps the derived
config.h.in defines (HAVE_TERMIOS_ISPEED/OSPEED/SPEED, WITH_STREAMS,
HAVE_HOSTS_DENY_TABLE) through the autoheader run that the configure.ac
changes force, so tests 459 and 460 pass.
The SPAKE plugin does not link -lcrypto in the wolfSSL build (LIBS
already carries wolfSSL), the KDC only installs the wolfSSL log callback
in a DEBUG_WOLFSSL build, and the configure debug leftovers are gone.
The extensions are built with X509V3_EXT_nconf_nid() and, for the
subject key identifier "hash", from X509_pubkey_digest() and
X509V3_EXT_i2d(); wolfSSL only stubs X509V3_EXT_conf_nid(). The key
identifier is the same value an OpenSSL build writes. Requires wolfSSL
with ASN1_TIME_set() and an X509_pubkey_digest() that digests the
subjectPublicKey.
The patch adds --with-wolfssl=DIR to configure.ac and enables wolfSSL
logging in DEBUG_WOLFSSL builds. --without-wolfssl is accepted, a bare
--with-wolfssl asks for the directory instead of picking up OpenSSL
headers, and --with-crypto warns when ignored. Link the README table to
the new version.
Add wolfssl-python-3.14.5.patch, build-wolfssl_py314.sh and the 3.14
section in Python/README.txt. Requires wolfSSL with
X509_VERIFY_PARAM_get_hostflags() and an AUTHORITY_INFO_ACCESS_free()
that frees the entries.

The wolfSSL CRL fallback in load_verify_locations closes the file, frees
the CRL and keeps errno for a missing cafile. IPADDR_MISMATCH raises
SSLCertVerificationError like DOMAIN_NAME_MISMATCH, so the tests assert
CertificateError. _get_aia_uri returns None for a duplicate AIA
extension like OpenSSL. test_session keeps the has_ticket assertion for
OpenSSL builds.
RSATests skips AsymMech::RSA_SSL under wolfSSL: the implementation
compiles the RSA_SSL case out (no NID_md5_sha1), so the test signed with
type 0 and produced a DigestInfo with an empty OID that only verified
against itself.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Several backend-selection paths break non-wolfSSL builds or fail to honor disable/reconfiguration options, and Python tests lose assertions.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds wolfSSL compatibility patches, build instructions, and test adjustments for multiple third-party projects.

Changes:

  • Adds compatibility patches for TLS, crypto backends, certificate handling, and build systems.
  • Adds project-specific wolfSSL build and test documentation.
  • Updates the project index with newer supported versions.
File summaries
File Description
README.md Updates project/version links.
tcpdump/4.99.6/* Adds wolfSSL configure support and documentation.
socat/1.8.1.1/* Adds wolfSSL support and SAN handling fixes.
Python/* Adds Python 3.14 wolfSSL patch, build script, and documentation.
openldap/2.6.13/* Adds wolfSSL TLS and CRL support.
net-snmp/README.md Documents upstream wolfSSL support.
msmtp/1.8.32/* Adds wolfSSL backend support.
msmtp/1.8.28/* Updates the older wolfSSL patch.
libvncserver/0.9.15.patch Adds CMake wolfSSL detection and linking.
libspdm/3.8.2/* Adds wolfSSL backend integration and tests.
libimobiledevice/1.4.0.patch Fixes wolfSSL certificate extension handling.
krb5/* Adds wolfSSL crypto/TLS integration and test changes.
jwt-cpp/0.7.2.patch Updates Ed25519 compatibility tests.
bind9/9.20.23.patch Adds wolfSSL configure support and compatibility definitions.
softhsm/2.7.0.patch Adds wolfSSL backend support and skips unsupported tests.
Review details
  • Files reviewed: 23/24 changed files
  • Comments generated: 8
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Python/wolfssl-python-3.14.5.patch Resolved
Comment thread krb5/Patch-for-Kerberos-5-1.22.2.patch Resolved
Comment thread socat/1.8.1.1/socat-1.8.1.1.patch Resolved
Comment thread Python/wolfssl-python-3.14.5.patch Resolved
Comment thread krb5/Patch-for-Kerberos-5-1.22.2.patch Resolved
Comment thread libspdm/3.8.2/libspdm-3.8.2.patch Resolved
Comment thread msmtp/1.8.28/wolfssl-msmtp-1.8.28.patch Resolved
Comment thread msmtp/1.8.32/wolfssl-msmtp-1.8.32.patch Resolved
--with-wolfssl=no only skipped the include and lib paths, then still
linked -lwolfssl and defined WITH_WOLFSSL. Do the whole wolfSSL setup
only when a path or yes is given, so "no" falls through to OpenSSL.
IS_WOLFSSL was cached and never cleared, so a build dir first configured
with CRYPTO=wolfssl stayed on wolfSSL when reconfigured with another
backend. Rewrite CRYPTO to openssl only after the CRYPTO cache entry is
written. The cache keeps "wolfssl", so a plain reconfigure still selects
wolfSSL and an explicit -DCRYPTO switches cleanly.
kdc/main.c included wolfssl/wolfcrypt/settings.h unconditionally, so a
krb5 build without wolfSSL failed to compile. Guard the include and the
debug logging hooks with HAVE_LIBWOLFSSL, like the rest of the patch.
--without-wolfssl took the wolfSSL branch with "no" as the prefix. Treat
"no" as not given, so the OpenSSL checks run.

The asyncio trailing-data tests dropped assertRaises(SSLWantReadError)
for every backend. Keep the assertion and relax it only for wolfSSL.
@philljj philljj self-assigned this Oct 14, 2026
@philljj

philljj commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

testing notes with gcc16 on Fedora 44:

  • openldap 2.6.13: good
  • msmtp 1.8.32: good. needs -Wno-discarded-qualifiers
conf.c:1073:12: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1073 |     if ((p = strchr(line, '\n')))
  • libvncserver 0.9.15: good
  • jwt-cpp 0.7.2: good
  • net-snmp: good
  • bind9 9.20.23: good
  • libspdm 3.8.2: good
  • socat 1.8.1.1: good-ish
Summary: 607 tests, 606 selected; 473 ok, 7 failed, 126 could not be performed
FAILED:  146 216 386 475 492 495 504
  • krb5 1.22.2: good. but must override WARN_CFLAGS to build krb5 with gcc16
ccbase.c: In function ‘krb5_cc_resolve’:
ccbase.c:213:8: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
  213 |     cp = strchr (name, ':');
      |        ^
  • libimobiledevice 1.4.0: good
  • tcpdump-4.99.6: good
  • python: difficult to test on Fedora 44
  • softhsm 2.7.0: good

pairs with this PR:

@philljj
philljj merged commit bfb5b40 into wolfSSL:master Dec 3, 2026
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.

4 participants