diff options
author | Damien Miller <djm@mindrot.org> | 2018-10-16 10:51:52 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-10-16 10:54:37 +1100 |
commit | 4e23deefd7959ef83c73ed9cce574423438f6133 (patch) | |
tree | 4b0c368f5c29f03a1ebed5f4f9315b5a303c3a78 | |
parent | 797cdd9c8468ed1125ce60d590ae3f1397866af4 (diff) |
Avoid deprecated OPENSSL_config when using 1.1.x
OpenSSL 1.1.x soft-deprecated OPENSSL_config in favour of
OPENSSL_init_crypto; pointed out by Jakub Jelen
-rw-r--r-- | openbsd-compat/openssl-compat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index 259fccbec..762358f06 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c | |||
@@ -75,7 +75,13 @@ ssh_OpenSSL_add_all_algorithms(void) | |||
75 | /* Enable use of crypto hardware */ | 75 | /* Enable use of crypto hardware */ |
76 | ENGINE_load_builtin_engines(); | 76 | ENGINE_load_builtin_engines(); |
77 | ENGINE_register_all_complete(); | 77 | ENGINE_register_all_complete(); |
78 | |||
79 | #if OPENSSL_VERSION_NUMBER < 0x10001000L | ||
78 | OPENSSL_config(NULL); | 80 | OPENSSL_config(NULL); |
81 | #else | ||
82 | OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | | ||
83 | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG); | ||
84 | #endif | ||
79 | } | 85 | } |
80 | #endif | 86 | #endif |
81 | 87 | ||