From: Tzafrir Cohen Date: Fri, 3 Feb 2017 08:25:33 +0000 (+0200) Subject: libasteriskssl: do nothing with OpenSSL >= 1.1 X-Git-Tag: 15.0.0-beta1~363^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F84%2F4884%2F1;p=thirdparty%2Fasterisk.git libasteriskssl: do nothing with OpenSSL >= 1.1 OpenSSL 1.1 requires no explicit initialization. The hacks in the library are not needed. They also happen to fail running Asterisk. Change-Id: I3b3efd5d80234a4c45a8ee58dcfe25b15d9ad100 --- diff --git a/main/libasteriskssl.c b/main/libasteriskssl.c index 36982e2be1..0ed05e3dcb 100644 --- a/main/libasteriskssl.c +++ b/main/libasteriskssl.c @@ -121,10 +121,13 @@ void ERR_free_strings(void) /*! * \internal * \brief Common OpenSSL initialization for all of Asterisk. + * + * Not needed for OpenSSL versions >= 1.1.0 */ int ast_ssl_init(void) { -#ifdef HAVE_OPENSSL +#if defined(HAVE_OPENSSL) && defined(OPENSSL_VERSION_NUMBER) && \ + OPENSSL_VERSION_NUMBER < 0x10100000L unsigned int i; int (*real_SSL_library_init)(void); void (*real_CRYPTO_set_id_callback)(unsigned long (*)(void)); @@ -189,7 +192,7 @@ int ast_ssl_init(void) startup_complete = 1; -#endif /* HAVE_OPENSSL */ +#endif /* HAVE_OPENSSL and its version < 1.1 */ return 0; }