From 0941757feba839f22f26985ae1a23dc02a878f50 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 2 Apr 2018 20:55:52 +0000 Subject: [PATCH] openssl: fix build with libressl 2.7 LibreSSL 2.7 introduced some of the OpenSSL 1.1 API. Signed-off-by: Natanael Copa --- configure.ac | 1 + lib/vtls/openssl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 798fa5f1e..9033165c1 100755 --- a/configure.ac +++ b/configure.ac @@ -1791,6 +1791,7 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno && AC_MSG_RESULT([no]) ]) + AC_CHECK_FUNCS( OpenSSL_version_num ) AC_MSG_CHECKING([for libressl]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 2a6b3cfac..9ae5313e1 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -117,7 +117,7 @@ #define X509_get0_notBefore(x) X509_get_notBefore(x) #define X509_get0_notAfter(x) X509_get_notAfter(x) #define CONST_EXTS /* nope */ -#ifdef LIBRESSL_VERSION_NUMBER +#ifndef HAVE_OPENSSL_VERSION_NUM && defined(LIBRESSL_VERSION_NUMBER) static unsigned long OpenSSL_version_num(void) { return LIBRESSL_VERSION_NUMBER; -- 2.16.3