]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: unbreak the build with newer libressl
authorDaniel Jakots <haproxy@chown.me>
Wed, 8 Dec 2021 01:34:39 +0000 (20:34 -0500)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 15 Dec 2021 10:26:31 +0000 (11:26 +0100)
In LibreSSL 3.5.0, BIO is going to become opaque, so haproxy's
compat macros will no longer work. The functions they substitute
have been available since LibreSSL 2.7.0.

include/haproxy/openssl-compat.h

index 17d073d51dbaf7dc2604fca640b8a2b8ebd79afb..123b76ede1a6c929badb0d5c783b96c10948f45d 100644 (file)
@@ -417,7 +417,7 @@ static inline X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx)
 #define SSL_CTX_get_extra_chain_certs(ctx, chain) do { *(chain) = (ctx)->extra_certs; } while (0)
 #endif
 
-#if HA_OPENSSL_VERSION_NUMBER < 0x10100000L
+#if HA_OPENSSL_VERSION_NUMBER < 0x10100000L && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL)
 #define BIO_get_data(b)            (b)->ptr
 #define BIO_set_data(b, v)         do { (b)->ptr  = (v); } while (0)
 #define BIO_set_init(b, v)         do { (b)->init = (v); } while (0)