fix build with openssl 3.0

Related: #1953492
This commit is contained in:
Remi Collet 2021-05-18 07:43:59 +02:00
parent f7a4c5780f
commit 4053076902
2 changed files with 29 additions and 1 deletions

23
php-openssl3.patch Normal file
View File

@ -0,0 +1,23 @@
From a7df3564004807b812f189048463d8ad89fb0f21 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
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);

View File

@ -62,7 +62,7 @@
Summary: PHP scripting language for creating dynamic web sites Summary: PHP scripting language for creating dynamic web sites
Name: php Name: php
Version: %{upver}%{?rcver:~%{rcver}} Version: %{upver}%{?rcver:~%{rcver}}
Release: 3%{?dist} Release: 4%{?dist}
# All files licensed under PHP version 3.01, except # All files licensed under PHP version 3.01, except
# Zend is licensed under Zend # Zend is licensed under Zend
# TSRM is licensed under BSD # TSRM is licensed under BSD
@ -114,6 +114,7 @@ Patch45: php-7.4.0-ldap_r.patch
Patch47: php-8.0.0-phpinfo.patch Patch47: php-8.0.0-phpinfo.patch
# Upstream fixes (100+) # Upstream fixes (100+)
Patch100: php-openssl3.patch
# Security fixes (200+) # Security fixes (200+)
@ -710,6 +711,7 @@ in pure PHP.
%patch47 -p1 -b .phpinfo %patch47 -p1 -b .phpinfo
# upstream patches # upstream patches
%patch100 -p1 -b .openssl3
# security patches # security patches
@ -1521,6 +1523,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
%changelog %changelog
* Tue May 18 2021 Remi Collet <rcollet@redhat.com> - 8.0.6-4
- fix build with openssl 3.0 #1953492
* Sat May 8 2021 Remi Collet <remi@remirepo.net> - 8.0.6-3 * Sat May 8 2021 Remi Collet <remi@remirepo.net> - 8.0.6-3
- get rid of inet_addr and gethostbyaddr calls - get rid of inet_addr and gethostbyaddr calls