summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/nsd/remote.c')
-rw-r--r--usr.sbin/nsd/remote.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/nsd/remote.c b/usr.sbin/nsd/remote.c
index c0319c4bc6f..d961dbf4146 100644
--- a/usr.sbin/nsd/remote.c
+++ b/usr.sbin/nsd/remote.c
@@ -237,10 +237,22 @@ daemon_remote_create(nsd_options_t* cfg)
assert(cfg->control_enable);
/* init SSL library */
+#ifdef HAVE_ERR_LOAD_CRYPTO_STRINGS
ERR_load_crypto_strings();
+#endif
ERR_load_SSL_strings();
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO)
OpenSSL_add_all_algorithms();
+#else
+ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
+ | OPENSSL_INIT_ADD_ALL_DIGESTS
+ | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
+#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_SSL)
(void)SSL_library_init();
+#else
+ OPENSSL_init_ssl(0, NULL);
+#endif
if(!RAND_status()) {
/* try to seed it */