This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1002589 - The unit test setup_certs.py from python-nss-docs fails
The unit test setup_certs.py from python-nss-docs fails
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-nss (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: John Dennis
Patrik Kis
: Regression, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-29 09:44 EDT by Patrik Kis
Modified: 2014-06-18 01:20 EDT (History)
1 user (show)

See Also:
Fixed In Version: python-nss-0.14.0-2.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 06:13:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrik Kis 2013-08-29 09:44:49 EDT
Description of problem:
The unit test setup_certs.py from python-nss-docs fails when executed on the latest RHEL-7 tree.
The test is passing on RHEL-6 and if we are providing these test in docs they should be functional.

Version-Release number of selected component (if applicable):
python-nss-0.14.0-1.el7
nss-3.15.1-2.el7

How reproducible:
always

Steps to Reproduce:

# python setup_certs.py 
setting up certs ...
certifcate database password="db_passwd"
CA nickname="test_ca", CA subject="CN=Test CA"
server nickname="test_server_subca", server subject="CN=ibm-x3650m4-02-vm-02.lab.eng.bos.redhat.com_subca"
client nickname="test_user", client subject="CN=test_user"
# 
# python test_client_server.py 

starting server:
server: using SSL
listening on: 0.0.0.0:1234
client: using SSL
client trying connection to: 10.16.40.239:1234
client connected to: 10.16.40.239:1234
client: sending "foo"
client connect from: 10.16.40.239:47107
auth_certificate_callback: check_sig=True is_server=False
approved_usage = SSL Server
verifying socket hostname (ibm-x3650m4-02-vm-02.lab.eng.bos.redhat.com) matches cert subject (CN=ibm-x3650m4-02-vm-02.lab.eng.bos.redhat.com)
Returning cert_is_valid = True
handshake complete, peer = 10.16.40.239:47107
handshake complete, peer = 10.16.40.239:1234
server: received "f"
server: sending "{f}"
client: received "{"
F
======================================================================
FAIL: test_ssl (__main__.TestSSL)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_client_server.py", line 354, in test_ssl
    self.assertEqual("{%s}" % request, reply)
AssertionError: '{foo}' != '{'

----------------------------------------------------------------------
Ran 1 test in 5.144s

FAILED (failures=1)
#
Comment 2 John Dennis 2013-10-04 19:15:27 EDT

*** This bug has been marked as a duplicate of bug 1003979 ***
Comment 3 John Dennis 2013-10-05 08:00:09 EDT
Reopening, original description was a bit confusing, it shows setup_certs.py as succeeding and test_client_server.py failing in a manner already reported in bug #1003979 which is why I marked it as a duplicate.

But in fact setup_certs.py does fail on RHEL7. It works fine on fedora, go figure.

setup_certs is written like an "expect" script, it sets up a pseudo terminal and polls for output, when it sees a certain string (i.e. prompt) it sends a response. It's complicated and fragile. There are several options available to simplify the script. 

Also, it should be creating the new sql style database.
Comment 4 John Dennis 2013-10-09 11:26:02 EDT
fixed in python-nss-0.14.0-2.el7
Comment 6 Ludek Smid 2014-06-13 06:13:52 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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