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).
This commit is contained in:
Darren Tucker 2018-11-25 14:05:57 +11:00
parent 98f878d227
commit 16fb23f254
1 changed files with 3 additions and 3 deletions

View File

@ -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