From 16fb23f25454991272bfe4598cc05d20fcd25116 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 25 Nov 2018 14:05:57 +1100 Subject: [PATCH] Reverse order of OpenSSL init functions. Try the new init function (OPENSSL_init_crypto) before falling back to the old one (OpenSSL_add_all_algorithms). --- openbsd-compat/openssl-compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index d8c00ebcb..a37ca61bf 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c @@ -69,13 +69,13 @@ ssh_compatible_openssl(long headerver, long libver) void ssh_libcrypto_init(void) { -#if defined(HAVE_OPENSSL_ADD_ALL_ALGORITHMS) - OpenSSL_add_all_algorithms(); -#elif defined(HAVE_OPENSSL_INIT_CRYPTO) && \ +#if defined(HAVE_OPENSSL_INIT_CRYPTO) && \ defined(OPENSSL_INIT_ADD_ALL_CIPHERS) && \ defined(OPENSSL_INIT_ADD_ALL_DIGESTS) OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); +#elif defined(HAVE_OPENSSL_ADD_ALL_ALGORITHMS) + OpenSSL_add_all_algorithms(); #endif #ifdef USE_OPENSSL_ENGINE