]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fixup openssl_thread init code to only run if compiled with SSL.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 11 Feb 2013 16:03:51 +0000 (16:03 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 11 Feb 2013 16:03:51 +0000 (16:03 +0000)
git-svn-id: file:///svn/unbound/trunk@2843 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/daemon.c
doc/Changelog
util/net_help.c

index 61258174fddb1ed815bb886c1565f34ed3dbf5d1..b91683feb916268261b0b9f20b98775542c84902 100644 (file)
@@ -211,7 +211,7 @@ daemon_init(void)
        comp_meth = (void*)SSL_COMP_get_compression_methods();
 #  endif
        (void)SSL_library_init();
-#  if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#  if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
        if(!ub_openssl_lock_init())
                fatal_exit("could not init openssl locks");
 #  endif
@@ -574,7 +574,7 @@ daemon_delete(struct daemon* daemon)
        ERR_remove_state(0);
        ERR_free_strings();
        RAND_cleanup();
-#  if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#  if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
        ub_openssl_lock_delete();
 #  endif
 #elif defined(HAVE_NSS)
index 8d10747a405a88f254bc73823e1f0da17ad0163f..9a364552357437b5dab382caf32b56b27608b9bf 100644 (file)
@@ -1,3 +1,6 @@
+11 February 2013: Wouter
+       - Fixup openssl_thread init code to only run if compiled with SSL.
+
 7 February 2013: Wouter
        - detect endianness in lookup3 on BSD.
        - add libunbound.ttl at end of result structure, version bump for
index 054fa50860302e4653bf21fe8fec427b16062bee..64bd876dcbb1641a0934652b9323292a47af4181 100644 (file)
@@ -726,7 +726,7 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
 #endif
 }
 
-#if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
 /** global lock list for openssl locks */
 static lock_basic_t *ub_openssl_locks = NULL;
 
@@ -751,7 +751,7 @@ ub_crypto_lock_cb(int mode, int type, const char *ATTR_UNUSED(file),
 
 int ub_openssl_lock_init(void)
 {
-#if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
        int i;
        ub_openssl_locks = (lock_basic_t*)malloc(
                sizeof(lock_basic_t)*CRYPTO_num_locks());
@@ -768,7 +768,7 @@ int ub_openssl_lock_init(void)
 
 void ub_openssl_lock_delete(void)
 {
-#if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
        int i;
        if(!ub_openssl_locks)
                return;