RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1289205 - use the default min/max TLS version provided by NSS [RHEL-6]
Summary: use the default min/max TLS version provided by NSS [RHEL-6]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: curl
Version: 6.7
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: Eva Mrakova
Petr Bokoc
URL:
Whiteboard:
: 1162746 1303186 1327919 (view as bug list)
Depends On: 1170339 1272504 1299564
Blocks: 1172231 1253743 1271238 1289134 1310222
TreeView+ depends on / blocked
 
Reported: 2015-12-07 16:37 UTC by Martin Poole
Modified: 2021-03-11 14:26 UTC (History)
18 users (show)

Fixed In Version: curl-7.19.7-50.el6
Doc Type: Enhancement
Doc Text:
TLS 1.1 and 1.2 are now enabled by default in *libcurl* Previously, versions 1.1 and 1.2 of the TLS protocol were disabled by default in *libcurl*. Users were required to explicitly enable these TLS versions in utilities based on *libcurl* in order to allow these utilities to securely communicate with servers that do not accept SSL 3.0 and TLS 1.0 connections. With this update, TLS 1.1 and TLS 1.2 are no longer disabled by default in *libcurl*. You can, however, explicitly disable them using the libcurl API.
Clone Of:
Environment:
Last Closed: 2016-05-11 00:36:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0915 0 normal SHIPPED_LIVE curl bug fix update 2016-05-10 22:52:28 UTC

Description Martin Poole 2015-12-07 16:37:08 UTC
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).

Comment 4 Steevithak 2016-01-08 18:01:20 UTC
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?

Comment 5 Kamil Dudka 2016-01-08 18:12:34 UTC
(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.

Comment 6 Mark McKinstry 2016-01-08 18:39:39 UTC
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.

Comment 7 Steevithak 2016-01-08 20:19:33 UTC
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.

Comment 8 Kamil Dudka 2016-01-08 20:29:52 UTC
(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.

Comment 9 Steevithak 2016-01-08 21:48:10 UTC
(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).

Comment 10 Kamil Dudka 2016-01-08 23:58:53 UTC
(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.

Comment 13 Valentina Mukhamedzhanova 2016-01-19 12:02:44 UTC
*** Bug 1162746 has been marked as a duplicate of this bug. ***

Comment 15 Kamil Dudka 2016-01-29 20:09:39 UTC
*** Bug 1303186 has been marked as a duplicate of this bug. ***

Comment 26 Kamil Dudka 2016-04-18 06:32:15 UTC
*** Bug 1327919 has been marked as a duplicate of this bug. ***

Comment 28 errata-xmlrpc 2016-05-11 00:36:40 UTC
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


Note You need to log in before you can comment on or make changes to this bug.