From: William Lallemand Date: Wed, 18 Nov 2026 10:33:35 +0000 (+0000) Subject: BUG/MINOR: ssl: exclude wolfSSL from custom extension support X-Git-Tag: v3.5-dev13~16 X-Git-Url: https://git.kaiwu.me/web/%22data:,/doc/static/%7B@url%7D?a=commitdiff_plain;h=b6daef35e5d9f52e556a767975b7930ab37b9aa7;p=haproxy.git BUG/MINOR: ssl: exclude wolfSSL from custom extension support wolfSSL provides SSL_CTX_add_server_custom_ext() as a stub which always returns zero. Do not advertise HAVE_SSL_CTX_ADD_SERVER_CUSTOM_EXT when building with wolfSSL. Since 8957622353 ("BUG/MEDIUM: ssl: fix an out-of-bounds read on SSL_CTX switch with a .sctl file"), the extension is registered on every frontend context. Calling the stub therefore makes certificate loading fail even when no .sctl file is present. Exclude wolfSSL from the capability guard while keeping the OpenSSL registration unchanged. Verified an ERR=1 build against wolfSSL 5.7.0, the verifyhost_san VTest, and live TLS requests using all three certificates from that test. This must be backported to all supported versions. --- diff --git a/include/haproxy/openssl-compat.h b/include/haproxy/openssl-compat.h index 065600734..ae4c88df1 100644 --- a/include/haproxy/openssl-compat.h +++ b/include/haproxy/openssl-compat.h @@ -123,7 +123,9 @@ enum ssl_encryption_level_t { #define HAVE_SSL_CLIENT_HELLO_CB #endif -#if ((OPENSSL_VERSION_NUMBER >= 0x1000200fL) && !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_IS_AWSLC)) +#if ((OPENSSL_VERSION_NUMBER >= 0x1000200fL) && !defined(OPENSSL_NO_TLSEXT) && \ + !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_IS_BORINGSSL) && \ + !defined(OPENSSL_IS_AWSLC) && !defined(USE_OPENSSL_WOLFSSL)) #define HAVE_SSL_CTX_ADD_SERVER_CUSTOM_EXT #endif