Commit d4a6baea4c for strongswan.org
commit d4a6baea4c055a0313d42e6727a7335ca9d98d38
Author: Tobias Brunner <tobias@strongswan.org>
Date: Mon Oct 12 17:33:31 2026 +0200
github: Link against OpenSSL 4 on macOS
The curl Homebrew Formula was recently updated to link against OpenSSL 4.
This caused failures for your thread local storage tests. The reason
turned out to be some key leaks due to our repeated init/deinit cycle
during the tests. After 512 keys (PTHREAD_KEYS_MAX), our test wasn't
able to create new keys (i.e. `pthread_key_create()` failed with EAGAIN)
and the NULL-key reuse caused the tests to fail. This was also triggered
by loading the curl plugin alone and is only fixed when the openssl
plugin linked to OpenSSL 4 is also loaded.
diff --git a/scripts/test.sh b/scripts/test.sh
index a44c5d1299..5506967363 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -386,10 +386,10 @@ macos)
--enable-revocation --enable-socket-default --enable-sshkey
--enable-stroke --enable-swanctl --enable-unity --enable-updown
--enable-x509 --enable-xauth-generic --enable-drbg"
- DEPS="automake autoconf libtool bison gperf pkgconf openssl@3 curl"
+ DEPS="automake autoconf libtool bison gperf pkgconf openssl@4 curl"
BREW_PREFIX=$(brew --prefix)
export PATH=$BREW_PREFIX/opt/bison/bin:$PATH
- for pkg in openssl@3 curl
+ for pkg in openssl@4 curl
do
PKG_CONFIG_PATH=$BREW_PREFIX/opt/$pkg/lib/pkgconfig:$PKG_CONFIG_PATH
CPPFLAGS="-I$BREW_PREFIX/opt/$pkg/include $CPPFLAGS"