Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1365490 - RHEA-2016:0817-1 broke usage of $ENV{HTTPS_CERT_FILE} and $ENV{HTTPS_KEY_FILE}
Summary: RHEA-2016:0817-1 broke usage of $ENV{HTTPS_CERT_FILE} and $ENV{HTTPS_KEY_FILE}
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: perl-libwww-perl
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Petr Pisar
QA Contact: Martin Kyral
URL:
Whiteboard:
Depends On:
Blocks: 1359263
TreeView+ depends on / blocked
 
Reported: 2016-08-09 11:39 UTC by Pasi Sjöholm
Modified: 2017-03-21 09:25 UTC (History)
5 users (show)

Fixed In Version: perl-libwww-perl-5.833-4.el6
Doc Type: If docs needed, set a value
Doc Text:
Cause: Using an LWP Perl module that does a client TLS authentication and the client credentials are specified by HTTPS_CERT_FILE and HTTPS_KEY_FILE environment variables after updating perl-libwww-perl package to 5.833-3.el6 version. Consequence: The module does not send client certificate to a server. This usually leads to access denial to an HTTPS server. Fix: A support for HTTPS_CERT_FILE and HTTPS_KEY_FILE environment variables to specify files with client's certificate and client's private key was added to LWP's IO::Socket::SSL TLS back-end. Result: LWP applications that used environment variables for specifying their TLS credentials keep working even with updated perl-libwww-perl package that changed default TLS backend from Net::SSL to IO::Socket::SSL.
Clone Of:
Environment:
Last Closed: 2017-03-21 09:25:37 UTC


Attachments (Terms of Use)
Fix (deleted)
2016-08-30 12:05 UTC, Petr Pisar
no flags Details | Diff
Test case (deleted)
2016-08-30 12:27 UTC, Petr Pisar
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0599 normal SHIPPED_LIVE perl-libwww-perl bug fix update 2017-03-21 12:26:06 UTC
Red Hat Bugzilla 745800 None CLOSED perl-libwww-perl: add support for setting SSL options in LWP::UserAgent 2019-03-27 14:59:19 UTC

Description Pasi Sjöholm 2016-08-09 11:39:19 UTC
Description of problem:

By default the RHEA-2016:0817-1 broke the usage of $ENV{HTTPS_CERT_FILE} and $ENV{HTTPS_KEY_FILE}. As the patch (https://bugzilla.redhat.com/attachment.cgi?id=1103499&action=diff) does not provide compability between IO::Socket:SSL and Net::SSL


Version-Release number of selected component (if applicable):
perl-libwww-perl-5.833-3.el6

How reproducible:
100%

Steps to Reproduce:
1. Use SSL client certificates through $ENV{HTTPS_CERT_FILE} and $ENV{HTTPS_KEY_FILE}

Actual results:
Failure.

Expected results:
Something that does not require people to modify using the code as the API gets broken between maintenance releases.

Comment 2 Petr Pisar 2016-08-30 11:34:59 UTC
Net::SSL recognizes these environment variables:

HTTPS_CA_DIR
HTTPS_CA_FILE
HTTPS_CERT_FILE
HTTPS_DEBUG
HTTPS_KEY_FILE
HTTPS_PKCS12_FILE
HTTPS_PKCS12_PASSWORD
HTTPS_PROXY
HTTPS_PROXY_PASSWORD
HTTPS_PROXY_USERNAME
HTTPS_VERSION

Not all of them can be implemented on top of IO::Socket::SSL. Thus full compatibility is not possible. We can add support for HTTPS_KEY_FILE and HTTPS_CERT_FILE easily.

But please contact Red Hat support. These changes are driven by customer requests and Bugzilla is not a support tool.

Comment 3 Petr Pisar 2016-08-30 12:05:58 UTC
Created attachment 1195865 [details]
Fix

Comment 4 Petr Pisar 2016-08-30 12:27:17 UTC
Created attachment 1195881 [details]
Test case

For testing you can use certificate and key files from test case in bug #745800 and this attached script.

How to test:

(1) Create TLS server and client certificates and keys.
(2) Start an TLS server requiring client certificate.
(3) Use an LWP user agent to connect to the server. The LWP user agent should be invoked with HTTPS_CERT_FILE and HTTPS_KEY_FILE environment variables pointing client certificate and key file.
(4) Check the server accepts a connection from the client because the client sent certificate specified in the HTTPS_CERT_FILE environment variable.
Before: The server refuses the connection because the client does not send any certificate.
After: The server accepts the connection.

Please perform the test with perl-IO-Socket-SSL and without perl-Crypt-SSLeay packages installed. Then repeat the test with perl-Crypt-SSLeay and without perl-IO-Socket-SSL installed.

Please note that this special compatibility fix is intended for RHEL-6 only.

Comment 13 errata-xmlrpc 2017-03-21 09:25:37 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-2017-0599.html


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