public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Remi Collet <remi@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/php] private-php86: Automatically load OpenSSL configuration file, from PHP 7.2
Date: Fri, 27 Nov 2026 07:28:38 GMT	[thread overview]
Message-ID: <179576451810.1.637125790599701363.rpms-php-0bfd45f309d4@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/php
Branch : private-php86
Commit : 0bfd45f309d48a3d89135605a8172607845112f1
Author : Remi Collet <remi@fedoraproject.org>
Date   : 2017-09-06T13:14:52+02:00
Stats  : +59/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/php/c/0bfd45f309d48a3d89135605a8172607845112f1?branch=private-php86

Log:
Automatically load OpenSSL configuration file, from PHP 7.2

---
diff --git a/php-7.1.9-openssl-load-config.patch b/php-7.1.9-openssl-load-config.patch
new file mode 100644
index 0000000..c998667
--- /dev/null
+++ b/php-7.1.9-openssl-load-config.patch
@@ -0,0 +1,52 @@
+Backported from PHP 7.2
+
+
+From 58df6a3b61f5cb914d899fbb44eecadad8098700 Mon Sep 17 00:00:00 2001
+From: Jakub Zelenka <bukka@php.net>
+Date: Mon, 28 Aug 2017 18:48:25 +0100
+Subject: [PATCH] Do not explicitly initialize and clean up OpenSSL for OpenSSL
+ 1.1
+
+From 1f843a8fb50de77a3f53a6b892a46d9e0afdfdd7 Mon Sep 17 00:00:00 2001
+From: Jakub Zelenka <bukka@php.net>
+Date: Mon, 28 Aug 2017 19:25:18 +0100
+Subject: [PATCH] Automatically load OpenSSL configuration file
+
+diff -up ./ext/openssl/openssl.c.loadconf ./ext/openssl/openssl.c
+--- ./ext/openssl/openssl.c.loadconf	2017-08-30 18:13:18.000000000 +0200
++++ ./ext/openssl/openssl.c	2017-09-06 13:11:47.212803443 +0200
+@@ -1409,6 +1409,8 @@ PHP_MINIT_FUNCTION(openssl)
+ 	le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number);
+ 	le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number);
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++	OPENSSL_config(NULL);
+ 	SSL_library_init();
+ 	OpenSSL_add_all_ciphers();
+ 	OpenSSL_add_all_digests();
+@@ -1421,6 +1423,9 @@ PHP_MINIT_FUNCTION(openssl)
+ #endif
+ 
+ 	SSL_load_error_strings();
++#else
++	OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
++#endif
+ 
+ 	/* register a resource id number with OpenSSL so that we can map SSL -> stream structures in
+ 	 * OpenSSL callbacks */
+@@ -1585,12 +1590,15 @@ PHP_MINFO_FUNCTION(openssl)
+  */
+ 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();
++	CONF_modules_free();
++#endif
+ 
+ 	php_unregister_url_stream_wrapper("https");
+ 	php_unregister_url_stream_wrapper("ftps");

diff --git a/php.spec b/php.spec
index 98e0f09..35a1292 100644
--- a/php.spec
+++ b/php.spec
@@ -67,7 +67,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
 # TSRM is licensed under BSD
@@ -111,6 +111,8 @@ Patch45: php-5.6.3-ldap_r.patch
 Patch46: php-7.0.0-fixheader.patch
 # drop "Configure command" from phpinfo output
 Patch47: php-5.6.3-phpinfo.patch
+# Automatically load OpenSSL configuration file
+Patch48: php-7.1.9-openssl-load-config.patch
 
 # Upstream fixes (100+)
 
@@ -718,6 +720,7 @@ support for JavaScript Object Notation (JSON) to PHP.
 %endif
 %patch46 -p1 -b .fixheader
 %patch47 -p1 -b .phpinfo
+%patch48 -p1 -b .loadconf
 
 # upstream patches
 
@@ -1505,6 +1508,9 @@ rm -f README.{Zeus,QNX,CVS-RULES}
 
 
 %changelog
+* Wed Sep  6 2017 Remi Collet <remi@fedoraproject.org> - 7.1.9-2
+- Automatically load OpenSSL configuration file, from PHP 7.2
+
 * Wed Aug 30 2017 Remi Collet <remi@fedoraproject.org> - 7.1.9-1
 - Update to 7.1.9 - http://www.php.net/releases/7_1_9.php
 

                 reply	other threads:[~2026-11-27  7:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179576451810.1.637125790599701363.rpms-php-0bfd45f309d4@fedoraproject.org \
    --to=remi@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox