aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdns-recursor/libressl-2.7.patch
blob: 7456cdce62cd86b924bfdc7dc6830d304888c93d (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
From 1648b8ff39c705fdee526cd73bf2652982b80087 Mon Sep 17 00:00:00 2001
From: Remi Gacogne <remi.gacogne@powerdns.com>
Date: Sat, 8 Sep 2018 17:15:14 +0200
Subject: [PATCH] Fix compilation with LibreSSL 2.7.0+

---
 pdns/opensslsigners.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pdns/opensslsigners.cc b/pdns/opensslsigners.cc
index 6a2e856940..d0a65e6489 100644
--- a/opensslsigners.cc
+++ b/opensslsigners.cc
@@ -77,6 +77,8 @@ void openssl_thread_cleanup()
   OPENSSL_free(openssllocks);
 }
 
+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
+/* those symbols are defined in LibreSSL 2.7.0+ */
 /* compat helpers. These DO NOT do any of the checking that the libssl 1.1 functions do. */
 static inline void RSA_get0_key(const RSA* rsakey, const BIGNUM** n, const BIGNUM** e, const BIGNUM** d) {
   *n = rsakey->n;
@@ -144,6 +146,8 @@ static inline int ECDSA_SIG_set0(ECDSA_SIG* signature, BIGNUM* pr, BIGNUM* ps) {
 }
 #endif /* HAVE_LIBCRYPTO_ECDSA */
 
+#endif /* !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL */
+
 #else
 void openssl_thread_setup() {}
 void openssl_thread_cleanup() {}