haproxy: Fix compilation without deprecated OpenSSL APIs

It seems there is a mistake in the version I sent upstream.

Cleaned up Makefile for consistency between packages.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2019-06-27 00:25:13 -07:00
parent 2138012a2e
commit 49382922f8
2 changed files with 19 additions and 6 deletions
@@ -0,0 +1,12 @@
--- a/include/common/openssl-compat.h
+++ b/include/common/openssl-compat.h
@@ -217,7 +217,8 @@ static inline int EVP_PKEY_base_id(EVP_PKEY *pkey)
#define TLSEXT_signature_ecdsa 3
#endif
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x20700000L))
#define X509_getm_notBefore X509_get_notBefore
#define X509_getm_notAfter X509_get_notAfter
#endif