Bug 1557342

Summary: pyOpenSSL testsuite - expired certificate
Product: Red Hat Enterprise Linux 7 Reporter: Stanislav Zidek <szidek>
Component: pyOpenSSLAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Stanislav Zidek <szidek>
Severity: low Docs Contact:
Priority: medium    
Version: 7.6CC: hkario, nmavrogi
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: pyOpenSSL-0.13.1-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1557344 (view as bug list) Environment:
Last Closed: 2018-10-30 09:48:30 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: 1563605    

Description Stanislav Zidek 2018-03-16 13:01:54 UTC
Description of problem:
Certificate hardcoded in upstream test suite of pyOpenSSL expired (2017-06-11 12:36:58 UTC as far as I can tell).

Version-Release number of selected component (if applicable):
pyOpenSSL-0.13.1-3.el7

How reproducible:
always

Steps to Reproduce:
1. trial /usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py


Actual results:
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py", line 633, in test_load_verify_directory
    self._load_verify_locations_test(None, capath)
  File "/usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py", line 588, in _load_verify_locations_test
    handshake(clientSSL, serverSSL)
  File "/usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py", line 109, in handshake
    conn.do_handshake()
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]

OpenSSL.test.test_ssl.ContextTests.test_load_verify_directory
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py", line 604, in test_load_verify_file
    self._load_verify_locations_test(cafile)
  File "/usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py", line 588, in _load_verify_locations_test
    handshake(clientSSL, serverSSL)
  File "/usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py", line 109, in handshake
    conn.do_handshake()
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]

OpenSSL.test.test_ssl.ContextTests.test_load_verify_file
===============================================================================


Expected results:
    test_load_verify_directory ...                                         [OK]
    test_load_verify_file ...                                              [OK]


Additional info:

Running the test with datefudge gives expected results:
datefudge 2017-01-01 trial /usr/lib64/python2.7/site-packages/OpenSSL/test/test_ssl.py

However, there are more bugs in upstream testsuite, see bz1155460.

Comment 6 errata-xmlrpc 2018-10-30 09:48:30 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://access.redhat.com/errata/RHBA-2018:3106