public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/php] private-php86: more upstream patch for OpenSSL 4.0
@ 2026-11-27 7:34 Remi Collet
0 siblings, 0 replies; only message in thread
From: Remi Collet @ 2026-11-27 7:34 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/php
Branch : private-php86
Commit : 6ff23f46891469d7a3f535463152d4d96e10a99a
Author : Remi Collet <remi@fedoraproject.org>
Date : 2026-04-30T16:00:45+02:00
Stats : +87/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/php/c/6ff23f46891469d7a3f535463152d4d96e10a99a?branch=private-php86
Log:
more upstream patch for OpenSSL 4.0
---
diff --git a/php-openssl4.patch b/php-openssl4.patch
index dec5bd2..7e3f738 100644
--- a/php-openssl4.patch
+++ b/php-openssl4.patch
@@ -55,3 +55,86 @@ index 92ccd9a546f9..e565707a3c40 100644
int top;
int bottom;
};
+From 0609a9badce04d03bbc9cfa6f3d51af23c1a0135 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 30 Apr 2026 15:52:19 +0200
+Subject: [PATCH] ASN1_STRING has been made opaque in OpenSSL 4
+
+---
+ ext/openssl/openssl_backend_common.c | 10 +++++-----
+ ext/openssl/xp_ssl.c | 14 +++++++-------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/ext/openssl/openssl_backend_common.c b/ext/openssl/openssl_backend_common.c
+index 222053984916..5aa8d246177e 100644
+--- a/ext/openssl/openssl_backend_common.c
++++ b/ext/openssl/openssl_backend_common.c
+@@ -108,7 +108,7 @@ void php_openssl_add_assoc_name_entry(zval * val, char * key, X509_NAME * name,
+
+ void php_openssl_add_assoc_asn1_string(zval * val, char * key, ASN1_STRING * str)
+ {
+- add_assoc_stringl(val, key, (char *)str->data, str->length);
++ add_assoc_stringl(val, key, (const char *)ASN1_STRING_get0_data(str), ASN1_STRING_length(str));
+ }
+
+ time_t php_openssl_asn1_time_to_time_t(ASN1_UTCTIME * timestr)
+@@ -140,12 +140,12 @@ time_t php_openssl_asn1_time_to_time_t(ASN1_UTCTIME * timestr)
+ }
+
+ if (timestr_len < 13) {
+- php_error_docref(NULL, E_WARNING, "Unable to parse time string %s correctly", timestr->data);
++ php_error_docref(NULL, E_WARNING, "Unable to parse time string %s correctly", ASN1_STRING_get0_data(timestr));
+ return (time_t)-1;
+ }
+
+ if (ASN1_STRING_type(timestr) == V_ASN1_GENERALIZEDTIME && timestr_len < 15) {
+- php_error_docref(NULL, E_WARNING, "Unable to parse time string %s correctly", timestr->data);
++ php_error_docref(NULL, E_WARNING, "Unable to parse time string %s correctly", ASN1_STRING_get0_data(timestr));
+ return (time_t)-1;
+ }
+
+@@ -626,8 +626,8 @@ int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
+ }
+
+ extension_data = X509_EXTENSION_get_data(extension);
+- p = extension_data->data;
+- length = extension_data->length;
++ p = ASN1_STRING_get0_data(extension_data);
++ length = ASN1_STRING_length(extension_data);
+ if (method->it) {
+ names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, &p, length,
+ ASN1_ITEM_ptr(method->it)));
+diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
+index eea758da4713..64f49ca4538d 100644
+--- a/ext/openssl/xp_ssl.c
++++ b/ext/openssl/xp_ssl.c
+@@ -492,12 +492,12 @@ static bool php_openssl_matches_san_list(X509 *peer, const char *subject_name) /
+ }
+ OPENSSL_free(cert_name);
+ } else if (san->type == GEN_IPADD) {
+- if (san->d.iPAddress->length == 4) {
++ if (ASN1_STRING_length(san->d.iPAddress) == 4) {
+ snprintf(ipbuffer, sizeof(ipbuffer), "%d.%d.%d.%d",
+- san->d.iPAddress->data[0],
+- san->d.iPAddress->data[1],
+- san->d.iPAddress->data[2],
+- san->d.iPAddress->data[3]
++ ASN1_STRING_get0_data(san->d.iPAddress)[0],
++ ASN1_STRING_get0_data(san->d.iPAddress)[1],
++ ASN1_STRING_get0_data(san->d.iPAddress)[2],
++ ASN1_STRING_get0_data(san->d.iPAddress)[3]
+ );
+ if (strcasecmp(subject_name, (const char*)ipbuffer) == 0) {
+ sk_GENERAL_NAME_pop_free(alt_names, GENERAL_NAME_free);
+@@ -506,9 +506,9 @@ static bool php_openssl_matches_san_list(X509 *peer, const char *subject_name) /
+ }
+ }
+ #ifdef HAVE_IPV6_SAN
+- else if (san->d.ip->length == 16 && subject_name_is_ipv6) {
++ else if (ASN1_STRING_length(san->d.ip) == 16 && subject_name_is_ipv6) {
+ ipbuffer[0] = 0;
+- EXPAND_IPV6_ADDRESS(ipbuffer, san->d.iPAddress->data);
++ EXPAND_IPV6_ADDRESS(ipbuffer, ASN1_STRING_get0_data(san->d.iPAddress));
+ if (strcasecmp((const char*)subject_name_ipv6_expanded, (const char*)ipbuffer) == 0) {
+ sk_GENERAL_NAME_pop_free(alt_names, GENERAL_NAME_free);
+
diff --git a/php.spec b/php.spec
index e2141ae..885025b 100644
--- a/php.spec
+++ b/php.spec
@@ -86,7 +86,7 @@ Name: php%{major_version}
Name: php
%endif
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
@@ -1666,6 +1666,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
%changelog
+* Thu Apr 30 2026 Remi Collet <remi@remirepo.net> - 8.5.6~RC3-2
+- more upstream patch for OpenSSL 4.0
+
* Thu Apr 30 2026 Remi Collet <remi@remirepo.net> - 8.5.6~RC3-1
- update to 8.5.6RC3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-27 7:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 7:34 [rpms/php] private-php86: more upstream patch for OpenSSL 4.0 Remi Collet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox