]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: allow to build without the renegotiation API of WolfSSL
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 28 Jan 2025 17:27:31 +0000 (18:27 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 28 Jan 2025 17:31:32 +0000 (18:31 +0100)
In ticket https://github.com/wolfSSL/wolfssl/issues/6834, it was
suggested to push --enable-haproxy within --enable-distro.

WolfSSL does not want to include the renegotiation support in
--enable-distro.

To achieve this, let haproxy build without SSL_renegotiate_pending()
when wolfssl does not define HAVE_SECURE_RENEGOCIATION or
HAVE_SERVER_RENEGOCIATION_INFO.

include/haproxy/openssl-compat.h

index 8250c2d17df21a3be5d507c79581bae4c851806c..adbe284a2f0583f0a659f2966bd334c99a424804 100644 (file)
@@ -417,7 +417,8 @@ static inline unsigned long ERR_peek_error_func(const char **func)
 #define SSL_OP_CIPHER_SERVER_PREFERENCE 0
 #endif
 
-#ifndef SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION   /* needs OpenSSL >= 0.9.7 */
+/* needs OpenSSL >= 0.9.7 and renegotation options on WolfSSL */
+#if !defined(SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION) && !defined(HAVE_SECURE_RENEGOTIATION) && !defined(HAVE_SERVER_RENEGOTIATION_INFO)
 #define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0
 #define SSL_renegotiate_pending(arg) 0
 #endif