From: Ilya Shipitsin Date: Sat, 18 Jan 2020 13:42:45 +0000 (+0500) Subject: BUG/MINOR: ssl: fix build on development versions of openssl-1.1.x X-Git-Tag: v2.2-dev1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=056c6295319516c396aa20741cf1dc613ee212e5;p=thirdparty%2Fhaproxy.git BUG/MINOR: ssl: fix build on development versions of openssl-1.1.x while working on issue #429, I encountered build failures with various non-released openssl versions, let us improve ssl defines, switch to features, not versions, for EVP_CTRL_AEAD_SET_IVLEN and EVP_CTRL_AEAD_SET_TAG. No backport is needed as there is no valid reason to build a stable haproxy version against a development version of openssl. --- diff --git a/include/common/openssl-compat.h b/include/common/openssl-compat.h index 72b4e2fe2d..cb9caa3e9f 100644 --- a/include/common/openssl-compat.h +++ b/include/common/openssl-compat.h @@ -284,8 +284,11 @@ static inline void EVP_PKEY_up_ref(EVP_PKEY *pkey) #define X509_getm_notAfter X509_get_notAfter #endif -#if (OPENSSL_VERSION_NUMBER < 0x1010000fL || defined LIBRESSL_VERSION_NUMBER) +#if !defined(EVP_CTRL_AEAD_SET_IVLEN) #define EVP_CTRL_AEAD_SET_IVLEN EVP_CTRL_GCM_SET_IVLEN +#endif + +#if !defined(EVP_CTRL_AEAD_SET_TAG) #define EVP_CTRL_AEAD_SET_TAG EVP_CTRL_GCM_SET_TAG #endif