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
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)
+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
#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;
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());
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;