summaryrefslogtreecommitdiff
blob: 644c73be32ffe523bb9ab654cdb959d4ff05f4a7 (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
From 25a44dacf4114f33f3a887f358c02f4fd9938427 Mon Sep 17 00:00:00 2001
From: Dorian Harmans <dorian@woohooyeah.nl>
Date: Fri, 23 Mar 2018 21:35:35 +0100
Subject: [PATCH] fix build with LibreSSL 2.7.0

---
 src/core/network-openssl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c
index 9fddf073e..692c7e716 100644
--- a/src/core/network-openssl.c
+++ b/src/core/network-openssl.c
@@ -35,7 +35,8 @@
 #include <openssl/err.h>
 
 /* OpenSSL 1.1.0 introduced some backward-incompatible changes to the api */
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
+    (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL)
 /* The two functions below could be already defined if OPENSSL_API_COMPAT is
  * below the 1.1.0 version so let's do a clean start */
 #undef  X509_get_notBefore
@@ -47,7 +48,8 @@
 
 /* OpenSSL 1.1.0 also introduced some useful additions to the api */
 #if (OPENSSL_VERSION_NUMBER >= 0x10002000L)
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+    (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
 static int X509_STORE_up_ref(X509_STORE *vfy)
 {
     int n;