summaryrefslogtreecommitdiff
path: root/openbsd-compat/openssl-compat.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-11-25 14:05:57 +1100
committerDarren Tucker <dtucker@dtucker.net>2018-11-25 14:05:57 +1100
commit16fb23f25454991272bfe4598cc05d20fcd25116 (patch)
tree27ab970cf22ca93bd155703cd1ab8f1623ad47c8 /openbsd-compat/openssl-compat.c
parent98f878d2272bf8dff21f2a0265d963c29e33fed2 (diff)
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).
Diffstat (limited to 'openbsd-compat/openssl-compat.c')
-rw-r--r--openbsd-compat/openssl-compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
index d8c00ebc..a37ca61b 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