mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-09 00:02:55 -05:00
- Fixup openssl_thread init code to only run if compiled with SSL.
git-svn-id: file:///svn/unbound/trunk@2843 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
556acaaf32
commit
69bf8dc41d
3 changed files with 8 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue