Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Add patch49 to enable TLS 1.1/1.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
carlwgeorge committed Dec 24, 2016
1 parent 9e0eed6 commit da1ca24
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
43 changes: 43 additions & 0 deletions SOURCES/php-7.1.0-curltls.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 6349d30d4fe6559d88472857c963f407bdf4d014 Mon Sep 17 00:00:00 2001
From: Carl George <[email protected]>
Date: Fri, 23 Dec 2016 19:13:25 -0600
Subject: [PATCH] enable TLS 1.1/1.2 support

Patch adapted from RHEL7's php-5.4.16-curltls.patch.

See also:
https://access.redhat.com/blogs/766093/posts/1976123
https://bugzilla.redhat.com/show_bug.cgi?id=1255920
https://bugzilla.redhat.com/show_bug.cgi?id=1291667
https://git.centos.org/blob/rpms!php.git/c7/SOURCES!php-5.4.16-curltls.patch
---
ext/curl/interface.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 741254c..094b9d5 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -897,6 +897,9 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv2);
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_SSLv3);
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1);
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_0);
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_1);
+ REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_2);

/* Curl TIMECOND constants (CURLOPT_TIMECONDITION) */
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
@@ -1275,10 +1278,6 @@ PHP_MINIT_FUNCTION(curl)

#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */
REGISTER_CURL_CONSTANT(CURLOPT_LOGIN_OPTIONS);
-
- REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_0);
- REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_1);
- REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_2);
#endif

#if LIBCURL_VERSION_NUM >= 0x072400 /* Available since 7.36.0 */
--
2.11.0
5 changes: 5 additions & 0 deletions SPECS/php71u.spec
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ 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
Patch49: php-7.1.0-curltls.patch

# Upstream fixes (100+)

Expand Down Expand Up @@ -1012,6 +1013,9 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1
%endif
%patch46 -p1 -b .fixheader
%patch47 -p1 -b .phpinfo
%if 0%{?rhel}
%patch49 -p1 -b .curltls
%endif

# upstream patches

Expand Down Expand Up @@ -1867,6 +1871,7 @@ fi
%changelog
* Fri Dec 23 2016 Carl George <[email protected]> - 7.1.0-3.ius
- Don't enable opcache.huge_code_pages during %%prep
- Add patch49 to enable TLS 1.1/1.2 support

* Fri Dec 09 2016 Carl George <[email protected]> - 7.1.0-2.ius
- Enable zip extension
Expand Down

0 comments on commit da1ca24

Please sign in to comment.