summaryrefslogtreecommitdiff
path: root/daemon/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/daemon.c')
-rw-r--r--daemon/daemon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/daemon/daemon.c b/daemon/daemon.c
index dad9f86b344e5..7411fabe75736 100644
--- a/daemon/daemon.c
+++ b/daemon/daemon.c
@@ -221,7 +221,9 @@ daemon_init(void)
# ifdef HAVE_ERR_LOAD_CRYPTO_STRINGS
ERR_load_crypto_strings();
# endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_SSL)
ERR_load_SSL_strings();
+#endif
# ifdef USE_GOST
(void)sldns_key_EVP_load_gost_id();
# endif
@@ -239,7 +241,7 @@ daemon_init(void)
# if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_SSL)
(void)SSL_library_init();
# else
- (void)OPENSSL_init_ssl(0, NULL);
+ (void)OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
# endif
# if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
if(!ub_openssl_lock_init())
@@ -421,8 +423,8 @@ daemon_create_workers(struct daemon* daemon)
daemon->rand = ub_initstate(seed, NULL);
if(!daemon->rand)
fatal_exit("could not init random generator");
+ hash_set_raninit((uint32_t)ub_random(daemon->rand));
}
- hash_set_raninit((uint32_t)ub_random(daemon->rand));
shufport = (int*)calloc(65536, sizeof(int));
if(!shufport)
fatal_exit("out of memory during daemon init");
@@ -691,6 +693,9 @@ daemon_cleanup(struct daemon* daemon)
#ifdef USE_DNSTAP
dt_delete(daemon->dtenv);
#endif
+#ifdef USE_DNSCRYPT
+ dnsc_delete(daemon->dnscenv);
+#endif
daemon->cfg = NULL;
}