blob: 407357bd94f687ab4b91ecf2905276bc75dcf564 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 0941757feba839f22f26985ae1a23dc02a878f50 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
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 <ncopa@alpinelinux.org>
---
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
@@ -1789,6 +1789,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
@@ -126,7 +126,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
|