Module: kamailio
Branch: master
Commit: 5b81ee816d77f4b2874bacb0c322de3bdefb074e
URL:
https://github.com/kamailio/kamailio/commit/5b81ee816d77f4b2874bacb0c322de3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-03-27T12:16:30+01:00
tls: use OPENSSL_init_ssl() for libssl 1.1
---
Modified: src/modules/tls/tls_init.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5b81ee816d77f4b2874bacb0c322de3…
Patch:
https://github.com/kamailio/kamailio/commit/5b81ee816d77f4b2874bacb0c322de3…
---
diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c
index a7f9ad7dd2..1046d38d3f 100644
--- a/src/modules/tls/tls_init.c
+++ b/src/modules/tls/tls_init.c
@@ -627,7 +627,13 @@ int tls_mod_pre_init_h(void)
return 0;
}
LM_DBG("preparing tls env for modules initialization\n");
+#if OPENSSL_VERSION_NUMBER >= 0x010100000L &&
!defined(LIBRESSL_VERSION_NUMBER)
+ LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n");
+ OPENSSL_init_ssl(0, NULL);
+#else
+ LM_DBG("preparing tls env for modules initialization (libssl <=1.0)\n");
SSL_library_init();
+#endif
SSL_load_error_strings();
tls_mod_preinitialized=1;
return 0;