]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: openssl-compat: Fix getm_ defines
authorRosen Penev <rosenp@gmail.com>
Thu, 19 Dec 2019 20:54:13 +0000 (12:54 -0800)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Dec 2019 15:01:31 +0000 (16:01 +0100)
LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition
always true. Check for the define before checking it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[wt: to be backported as far as 1.9]

include/common/openssl-compat.h

index 25102fbe3cb5deb0370d7335c06d994e7c6b5304..31971bd9e8d353818a6d6339ed742585a6a34333 100644 (file)
@@ -278,7 +278,8 @@ static inline void EVP_PKEY_up_ref(EVP_PKEY *pkey)
 #define TLSEXT_signature_ecdsa      3
 #endif
 
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if ((HA_OPENSSL_VERSION_NUMBER < 0x1010000fL) && (LIBRESSL_VERSION_NUMBER < 0x2070000fL)) ||\
+       defined(OPENSSL_IS_BORINGSSL)
 #define X509_getm_notBefore     X509_get_notBefore
 #define X509_getm_notAfter      X509_get_notAfter
 #endif