Browse code

tls: use OPENSSL_init_ssl() for libssl 1.1

Daniel-Constantin Mierla authored on 26/03/2019 21:15:56
Showing 1 changed files
... ...
@@ -627,7 +627,13 @@ int tls_mod_pre_init_h(void)
627 627
 		return 0;
628 628
 	}
629 629
 	LM_DBG("preparing tls env for modules initialization\n");
630
+#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
631
+	LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n");
632
+	OPENSSL_init_ssl(0, NULL);
633
+#else
634
+	LM_DBG("preparing tls env for modules initialization (libssl <=1.0)\n");
630 635
 	SSL_library_init();
636
+#endif
631 637
 	SSL_load_error_strings();
632 638
 	tls_mod_preinitialized=1;
633 639
 	return 0;