$OpenBSD: patch-pdns_opensslsigners_cc,v 1.4 2018/03/18 22:56:21 sthen Exp $

XXX auto-init may mean that thread locking can be avoided; if so, the whole
"OPENSSL_VERSION_NUMBER < 0x1010000fL || defined LIBRESSL_VERSION_NUMBER)"
block can be disabled


Index: pdns/opensslsigners.cc
--- pdns/opensslsigners.cc.orig
+++ pdns/opensslsigners.cc
@@ -76,6 +76,7 @@ void openssl_thread_cleanup()
   OPENSSL_free(openssllocks);
 }
 
+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
 /* 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;
@@ -142,6 +143,7 @@ static inline int ECDSA_SIG_set0(ECDSA_SIG* signature,
   return 1;
 }
 #endif /* HAVE_LIBCRYPTO_ECDSA */
+#endif
 
 #else
 void openssl_thread_setup() {}
