From: Daniel Jakots Date: Wed, 8 Dec 2021 01:34:39 +0000 (-0500) Subject: BUILD: ssl: unbreak the build with newer libressl X-Git-Tag: v2.6-dev1~288 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1a2e2b0d1da0dff726738343fbaed044fb93470;p=thirdparty%2Fhaproxy.git BUILD: ssl: unbreak the build with newer libressl 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. --- diff --git a/include/haproxy/openssl-compat.h b/include/haproxy/openssl-compat.h index 17d073d51d..123b76ede1 100644 --- a/include/haproxy/openssl-compat.h +++ b/include/haproxy/openssl-compat.h @@ -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)