Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit c53d1ca

Browse files
committed
Add patch49 to enable TLS 1.1/1.2 support
1 parent 8bd7b59 commit c53d1ca

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

php-7.1.0-curltls.patch

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From 6349d30d4fe6559d88472857c963f407bdf4d014 Mon Sep 17 00:00:00 2001
2+
From: Carl George <[email protected]>
3+
Date: Fri, 23 Dec 2016 19:13:25 -0600
4+
Subject: [PATCH] enable TLS 1.1/1.2 support
5+
6+
Patch adapted from RHEL7's php-5.4.16-curltls.patch.
7+
8+
See also:
9+
https://access.redhat.com/blogs/766093/posts/1976123
10+
https://bugzilla.redhat.com/show_bug.cgi?id=1255920
11+
https://bugzilla.redhat.com/show_bug.cgi?id=1291667
12+
https://git.centos.org/blob/rpms!php.git/c7/SOURCES!php-5.4.16-curltls.patch
13+
---
14+
ext/curl/interface.c | 7 +++----
15+
1 file changed, 3 insertions(+), 4 deletions(-)
16+
17+
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
18+
index 741254c..094b9d5 100644
19+
--- a/ext/curl/interface.c
20+
+++ b/ext/curl/interface.c
21+
@@ -897,6 +897,9 @@ PHP_MINIT_FUNCTION(curl)
22+
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv2);
23+
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv3);
24+
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1);
25+
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_0);
26+
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_1);
27+
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_2);
28+
29+
/* Curl TIMECOND constants (CURLOPT_TIMECONDITION) */
30+
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
31+
@@ -1275,10 +1278,6 @@ PHP_MINIT_FUNCTION(curl)
32+
33+
#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */
34+
REGISTER_CURL_CONSTANT(CURLOPT_LOGIN_OPTIONS);
35+
-
36+
- REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_0);
37+
- REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_1);
38+
- REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_2);
39+
#endif
40+
41+
#if LIBCURL_VERSION_NUM >= 0x072400 /* Available since 7.36.0 */
42+
--
43+
2.11.0

php73.spec

+5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Patch45: php-7.2.3-ldap_r.patch
111111
Patch46: php-7.2.4-fixheader.patch
112112
# drop "Configure command" from phpinfo output
113113
Patch47: php-5.6.3-phpinfo.patch
114+
Patch49: php-7.1.0-curltls.patch
114115

115116
# Upstream fixes (100+)
116117
Patch100: php-upstream.patch
@@ -871,6 +872,9 @@ low-level PHP extension for the libsodium cryptographic library.
871872
%endif
872873
%patch46 -p1 -b .fixheader
873874
%patch47 -p1 -b .phpinfo
875+
%if 0%{?rhel}
876+
%patch49 -p1 -b .curltls
877+
%endif
874878

875879
# upstream patches
876880
%patch100 -p1 -b .up
@@ -1734,6 +1738,7 @@ exit 0
17341738
- Move httpd module to a mod_php subpackage
17351739
- Add fpm-nginx and fpm-httpd subpackages
17361740
- Use bundled PCRE
1741+
- Add patch49 to enable TLS 1.1/1.2 support
17371742

17381743
* Tue Apr 2 2019 Remi Collet <[email protected]> - 7.3.4-1
17391744
- Update to 7.3.4 - http://www.php.net/releases/7_3_4.php

0 commit comments

Comments
 (0)