le_x509 = zend_register_list_destructors_ex(php_openssl_x509_free, NULL, "OpenSSL X.509", module_number);
le_csr = zend_register_list_destructors_ex(php_openssl_csr_free, NULL, "OpenSSL X.509 CSR", module_number);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
SSL_library_init();
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
#endif
SSL_load_error_strings();
+#endif
/* register a resource id number with OpenSSL so that we can map SSL -> stream structures in
* OpenSSL callbacks */
*/
PHP_MSHUTDOWN_FUNCTION(openssl)
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
EVP_cleanup();
/* prevent accessing locking callback from unloaded extension */
CRYPTO_set_locking_callback(NULL);
/* free allocated error strings */
ERR_free_strings();
+#endif
php_unregister_url_stream_wrapper("https");
php_unregister_url_stream_wrapper("ftps");