1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

libcrypto: Fix compilation without deprecated OpenSSL APIs

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Rosen Penev
2019-04-28 16:53:41 -07:00
committed by Andreas Schneider
parent 6cd506ea81
commit 815a53375e

View File

@@ -1094,7 +1094,9 @@ int ssh_crypto_init(void)
OPENSSL_ia32cap &= ~(1LL << 57); OPENSSL_ia32cap &= ~(1LL << 57);
} }
#endif #endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L
OpenSSL_add_all_algorithms(); OpenSSL_add_all_algorithms();
#endif
for (i = 0; ssh_ciphertab[i].name != NULL; i++) { for (i = 0; ssh_ciphertab[i].name != NULL; i++) {
int cmp; int cmp;
@@ -1123,8 +1125,10 @@ void ssh_crypto_finalize(void)
return; return;
} }
#if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_cleanup(); EVP_cleanup();
CRYPTO_cleanup_all_ex_data(); CRYPTO_cleanup_all_ex_data();
#endif
libcrypto_initialized = 0; libcrypto_initialized = 0;
} }