diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | openbsd-compat/openssl-compat.c | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 53a16c39a..3f7fe2cd0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -2710,6 +2710,7 @@ if test "x$openssl" = "xyes" ; then | |||
2710 | ]) | 2710 | ]) |
2711 | # LibreSSL/OpenSSL 1.1x API | 2711 | # LibreSSL/OpenSSL 1.1x API |
2712 | AC_CHECK_FUNCS([ \ | 2712 | AC_CHECK_FUNCS([ \ |
2713 | OPENSSL_init_crypto \ | ||
2713 | DH_get0_key \ | 2714 | DH_get0_key \ |
2714 | DH_get0_pqg \ | 2715 | DH_get0_pqg \ |
2715 | DH_set0_key \ | 2716 | DH_set0_key \ |
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index 590b66d16..5ade8f0ba 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c | |||
@@ -76,11 +76,14 @@ ssh_OpenSSL_add_all_algorithms(void) | |||
76 | ENGINE_load_builtin_engines(); | 76 | ENGINE_load_builtin_engines(); |
77 | ENGINE_register_all_complete(); | 77 | ENGINE_register_all_complete(); |
78 | 78 | ||
79 | #if OPENSSL_VERSION_NUMBER < 0x10100000L | 79 | #if defined(HAVE_OPENSSL_INIT_CRYPTO) && \ |
80 | OPENSSL_config(NULL); | 80 | defined(OPENSSL_INIT_ADD_ALL_CIPHERS) && \ |
81 | #else | 81 | defined(OPENSSL_INIT_ADD_ALL_DIGESTS) && \ |
82 | defined(OPENSSL_INIT_LOAD_CONFIG) | ||
82 | OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | | 83 | OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | |
83 | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG, NULL); | 84 | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG, NULL); |
85 | #else | ||
86 | OPENSSL_config(NULL); | ||
84 | #endif | 87 | #endif |
85 | } | 88 | } |
86 | #endif | 89 | #endif |