]> granicus.if.org Git - pdns/commitdiff
opensslsigners: remove thread/locking setup, not needed in openssl 1.1 anymore
authorChristian Hofstaedtler <zeha@debian.org>
Mon, 27 Jun 2016 13:50:31 +0000 (13:50 +0000)
committerChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Fri, 29 Jul 2016 12:42:30 +0000 (14:42 +0200)
pdns/opensslsigners.cc

index db2bbedbfa4c5c357ad1e0162fc6b529d451b177..d82b2f45d8a8c32d2701733684c6b759fb8128aa 100644 (file)
@@ -8,12 +8,12 @@
 #include <openssl/sha.h>
 #include <openssl/rand.h>
 #include <openssl/rsa.h>
+#include <openssl/opensslv.h>
 #include "opensslsigners.hh"
 #include "dnssecinfra.hh"
 
-
-/* pthread locking */
-
+#if OPENSSL_VERSION_NUMBER < 0x1010000fL
+/* OpenSSL < 1.1.0 needs support for threading/locking in the calling application. */
 static pthread_mutex_t *openssllocks;
 
 extern "C" {
@@ -54,7 +54,10 @@ void openssl_thread_cleanup()
 
   OPENSSL_free(openssllocks);
 }
-
+#else
+void openssl_thread_setup() {}
+void openssl_thread_cleanup() {}
+#endif
 
 /* seeding PRNG */