php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60157
Patch call_OPENSSL_config revision 2017-09-21 09:28 UTC by VadimZelenin at gmail dot com

Patch call_OPENSSL_config for OpenSSL related Bug #60157

Patch version 2017-09-21 09:28 UTC

Return to Bug #60157 | Download this patch
Patch Revisions:

Developer: VadimZelenin@gmail.com

diff -up php-5.3.3/ext/openssl/openssl.c.orig php-5.3.3/ext/openssl/openssl.c
--- php-5.3.3/ext/openssl/openssl.c.orig	2017-09-20 18:34:34.000000000 +0300
+++ php-5.3.3/ext/openssl/openssl.c	2017-09-20 18:59:29.225998578 +0300
@@ -983,6 +983,10 @@ PHP_MINIT_FUNCTION(openssl)
 	le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number);
 
 	SSL_library_init();
+
+	/* as recommended on https://wiki.openssl.org/index.php/SSL/TLS_Client#Initialization */
+	OPENSSL_config(NULL);
+
 	OpenSSL_add_all_ciphers();
 	OpenSSL_add_all_digests();
 	OpenSSL_add_all_algorithms();
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Dec 02 13:01:23 2020 UTC