Bug 1298227

Summary: Support using TLS libraries that do not have SSLv3 support
Product: Red Hat Enterprise Linux 7 Reporter: Michael Peters <alice>
Component: boostAssignee: Jonathan Wakely <jwakely>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: mcermak, mnewsome, mprchlik
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: Allow Boost.Asio to be used with SSL libraries that don't support SSLv3 Reason: Boost.Asio can be used with alternative TLS libraries instead of the default OpenSSL in Red Hat Enterprise Linux, but it assumes they support SSLv3. The Boost.Asio headers have been changed to only use SSLv3 features conditionally, depending on the TLS library in use. Result: Boost.Asio headers can be used with alternative TLS libraries that do not support SSLv3.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 06:32:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1297579, 1313485    
Attachments:
Description Flags
small patch that fixes the issue none

Description Michael Peters 2016-01-13 14:30:37 UTC
Created attachment 1114410 [details]
small patch that fixes the issue

Description of problem:

Boost in RHEL/CentOS 7 assumes the TLS library has SSLv3 support


Version-Release number of selected component (if applicable):
boost-1.53.0-25

How reproducible:
always

Steps to Reproduce:
1. Attempt to build software that uses boost against TLS library w/o SSLv3
2.
3.

Actual results:

/usr/include/boost/asio/ssl/impl/context.ipp: In constructor 'boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)':
/usr/include/boost/asio/ssl/impl/context.ipp:61:29: error: '::SSLv3_method' has not been declared
     handle_ = ::SSL_CTX_new(::SSLv3_method());
                             ^
/usr/include/boost/asio/ssl/impl/context.ipp:64:29: error: '::SSLv3_client_method' has not been declared
     handle_ = ::SSL_CTX_new(::SSLv3_client_method());
                             ^
/usr/include/boost/asio/ssl/impl/context.ipp:67:29: error: '::SSLv3_server_method' has not been declared
     handle_ = ::SSL_CTX_new(::SSLv3_server_method()); 


Expected results:

Software should compile

Additional info:

The OpenSSL in RHEL / CentOS 7 has had some EC stuff removed due to possible software patent issues.

For those of us who understand the legal risk but want to build software that needs those features, we can install an alternate TLS implementation to build against.

However when that alternate TLS implementation has removed SSLv3 support, building software against it that uses boost results in the above error.

The patch to fix this is described at https://github.com/boostorg/asio/pull/23/files

Attached is a patch I made against the boost in CentOS 7 src.rpm that implements the above fix and is tested to resolve the issue on my CentOS 7 workstation (building bitcoin-core against LibreSSL)

It should be noted that SSLv3 is extremely old and is no longer considered to be secure and should not be used.

Some distributions, e.g. Debian, have removed SSLv3 from their own OpenSSL implementations and it would not surprise me if Red Hat chose to do the same in the near future.

Removing SSLv3 from OpenSSL would also require this patch, so applying this patch now would not only make things easier for people using alternate TLS implementations, it also would prepare boost in the event that SSLv3 is removed from your own TLS library.

Comment 3 Jonathan Wakely 2016-06-08 13:18:05 UTC
I've fixed this in git, will do a build after I push a couple more fixes.

Comment 5 Miloš Prchlík 2016-07-04 08:37:52 UTC
Verified for build boost-1.53.0-26.el7.

Comment 7 errata-xmlrpc 2016-11-04 06:32:49 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/RHEA-2016-2442.html