Hide Forgot
Description of problem: As a follow-on from Bug 1012136 - [RFE] option to enable TLS 1.2 in curl to fulfill the requirements of 1253743 [NEW high] update RHEL 6 components that do not yet support TLS 1.2 libcurl needs to enable TLSv1.2 by default (or enable use of highest available as provided by installed by nss).
What's the ETA on this? We've got an ecommerce app running on RHEL 6 that relies on PHP/libcurl and has to meet the new PCI requirements for TLS 1.2 by Jan 15. I've been debugging the problem for days and finally stumbled onto this bug. Is there a testing version of libcurl or anything I can do as a temporary measure to get PHP/libcurl to force TLS 1.2? Or is moving to RHEL 7.0 our best bet for fixing this in our timeframe?
(In reply to Steevithak from comment #4) > What's the ETA on this? I believe the fix for this bug will be included in RHEL-6.8. > Is there a testing version of libcurl or anything I can do as a temporary > measure to get PHP/libcurl to force TLS 1.2? As for libcurl, you can force TLS 1.2 by using the CURLOPT_SSLVERSION option. Note that even if this bug (and bug #1272504) are fixed, TLS 1.2 will not be forced, but only enabled by default. > Or is moving to RHEL 7.0 our > best bet for fixing this in our timeframe? As you suggest, this is already fixed in RHEL-7. See bug #1170339 for details.
Steevithak, I created a patched RPM a month back when it looked like this wasn't going to be fixed in RHEL 6. You can find it at https://github.com/mmckinst/curl-el6 , the patch is https://github.com/mmckinst/curl-el6/blob/master/SOURCES/curl-7.19.7-bz1042989.patch . This is my custom RPM and not supported by Red Hat but its out there if you or anyone else wants to use it before its officially fixed in RHEL 6.8.
Mark: Thanks, downloading now! Kamil: I've verified that our scripts use TLS 1.2 on RHEL 7 but on RHEL 6 they report TLS 1.0. Maybe "force" is a bad choice of words on my part but I'm just looking for any way to cause RHEL 6 libcurl to use TLS 1.2. I'm happy with "enabling" it if there's a way to do that. I've already looked at CURLOPT_SSLVERSION but haven't found a setting that turns it on - can you recommend a specific setting there? I've tried adding this line to our php code: curl_setopt($c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2) But it seems to have no effect and TLS 1.0 is still used.
(In reply to Steevithak from comment #7) > I've tried adding this line to our php code: > > curl_setopt($c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2) > > But it seems to have no effect and TLS 1.0 is still used. With el6 libcurl, CURL_SSLVERSION_TLSv1_2 means "TLS 1.2 only" whereas CURL_SSLVERSION_TLSv1 means "TLS 1.x". Both of them are known to work. I am not sure about the PHP binding. If you think it does not work, please file a separate bug report with some steps to reproduce.
(In reply to Kamil Dudka from comment #8) > With el6 libcurl, CURL_SSLVERSION_TLSv1_2 means "TLS 1.2 only" whereas > CURL_SSLVERSION_TLSv1 means "TLS 1.x". Both of them are known to work. > > I am not sure about the PHP binding. If you think it does not work, please > file a separate bug report with some steps to reproduce. Interesting. I looked into this further and discovered that the constant value for CURL_SSLVERSION_TLSv1_2 is 6. If I do this: curl_setopt($c, CURLOPT_SSLVERSION, 6) It actually does connect with TLS 1.2! However, doing this: curl_setopt($c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2) has no effect and I still get a TLS 1.0 connection. So the existing libcurl actually does work but somehow the constant isn't defined (or isn't correct) within PHP. I'll investigate this more and file another bug if needed. Thanks! However, everything works fine on CentOS 7 and with Mark's libcurl on CentOS 6 (because TLS 1.2 works by default, so I don't need to set CURLOPT).
(In reply to Steevithak from comment #9) > Interesting. I looked into this further and discovered that the constant > value for CURL_SSLVERSION_TLSv1_2 is 6. If I do this: > > curl_setopt($c, CURLOPT_SSLVERSION, 6) > > It actually does connect with TLS 1.2! > > However, doing this: > > curl_setopt($c, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2) > > has no effect and I still get a TLS 1.0 connection. So the existing libcurl > actually does work but somehow the constant isn't defined (or isn't correct) > within PHP. Looks like bug #1255920.
*** Bug 1162746 has been marked as a duplicate of this bug. ***
*** Bug 1303186 has been marked as a duplicate of this bug. ***
*** Bug 1327919 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0915.html