diff --git a/php-openssl3.patch b/php-openssl3.patch new file mode 100644 index 0000000..5eb2de7 --- /dev/null +++ b/php-openssl3.patch @@ -0,0 +1,23 @@ +From a7df3564004807b812f189048463d8ad89fb0f21 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 18 May 2021 07:58:49 +0200 +Subject: [PATCH] minimal fix for openssl 3.0 + +--- + ext/openssl/openssl.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c +index 340e40a001bb6..0ed4233b21255 100644 +--- a/ext/openssl/openssl.c ++++ b/ext/openssl/openssl.c +@@ -1221,7 +1221,9 @@ PHP_MINIT_FUNCTION(openssl) + REGISTER_LONG_CONSTANT("OPENSSL_CMS_NOSIGS", CMS_NOSIGS, CONST_CS|CONST_PERSISTENT); + + REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT); ++#ifdef RSA_SSLV23_PADDING + REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); ++#endif + REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); + diff --git a/php.spec b/php.spec index e1f696f..bd09816 100644 --- a/php.spec +++ b/php.spec @@ -62,7 +62,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 3%{?dist} +Release: 4%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -114,6 +114,7 @@ Patch45: php-7.4.0-ldap_r.patch Patch47: php-8.0.0-phpinfo.patch # Upstream fixes (100+) +Patch100: php-openssl3.patch # Security fixes (200+) @@ -710,6 +711,7 @@ in pure PHP. %patch47 -p1 -b .phpinfo # upstream patches +%patch100 -p1 -b .openssl3 # security patches @@ -1521,6 +1523,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %changelog +* Tue May 18 2021 Remi Collet - 8.0.6-4 +- fix build with openssl 3.0 #1953492 + * Sat May 8 2021 Remi Collet - 8.0.6-3 - get rid of inet_addr and gethostbyaddr calls