]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Avoid deprecated OPENSSL_config when using 1.1.x
authorDamien Miller <djm@mindrot.org>
Mon, 15 Oct 2018 23:51:52 +0000 (10:51 +1100)
committerDamien Miller <djm@mindrot.org>
Mon, 15 Oct 2018 23:54:37 +0000 (10:54 +1100)
OpenSSL 1.1.x soft-deprecated OPENSSL_config in favour of
OPENSSL_init_crypto; pointed out by Jakub Jelen

openbsd-compat/openssl-compat.c

index 259fccbec62e5453149209b642e47203a2fc5734..762358f06e3e90a26d0ed066c0eeecba3e2bacc7 100644 (file)
@@ -75,7 +75,13 @@ ssh_OpenSSL_add_all_algorithms(void)
        /* Enable use of crypto hardware */
        ENGINE_load_builtin_engines();
        ENGINE_register_all_complete();
+
+#if OPENSSL_VERSION_NUMBER < 0x10001000L
        OPENSSL_config(NULL);
+#else
+       OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
+           OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG);
+#endif
 }
 #endif