mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
openssl: fix build with OpenSSL 1.1 API (#176)
When building with OPENSSL_API_COMPAT=0x10100000L, OpenSSL_add_all_algorithms and OpenSSL_add_all_ciphers don't exist. The corresponding functionality is handled automatically with OpenSSL 1.1.
This commit is contained in:
committed by
Will Cosgrove
parent
bbc43cb333
commit
c423b543ca
@@ -226,10 +226,16 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx);
|
||||
#define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
|
||||
#endif
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
#define libssh2_crypto_init() \
|
||||
ENGINE_load_builtin_engines(); \
|
||||
ENGINE_register_all_complete()
|
||||
#else
|
||||
#define libssh2_crypto_init() \
|
||||
OpenSSL_add_all_algorithms(); \
|
||||
ENGINE_load_builtin_engines(); \
|
||||
ENGINE_register_all_complete()
|
||||
#endif
|
||||
|
||||
#define libssh2_crypto_exit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user