Bug 1154776 - Add API call for SSL_VersionRangeSet (rebase)
Summary: Add API call for SSL_VersionRangeSet (rebase)
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-nss
Version: 6.7
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: John Dennis
QA Contact: Stanislav Zidek
Depends On:
Blocks: 1154687 1155703 1156466 1175494
TreeView+ depends on / blocked
Reported: 2014-10-20 18:02 UTC by Rob Crittenden
Modified: 2015-07-22 06:34 UTC (History)
6 users (show)

Fixed In Version: python-nss-0.16.0-1.el6
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
The python-nss packages have been upgraded to upstream version 0.16.0, which provides a number of bug fixes and enhancements over the previous version, including: * Added support for setting trust attributes on a certificate. * Added support for the SSL version range API, information on the SSL cipher suites, and information on the SSL connection. (BZ#1154776)
Clone Of:
: 1155703 (view as bug list)
Last Closed: 2015-07-22 06:34:05 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1324 normal SHIPPED_LIVE python-nss bug fix and enhancement update 2015-07-20 17:53:10 UTC

Description Rob Crittenden 2014-10-20 18:02:13 UTC
Description of problem:

The old protocol API for NSS allows only SSL2, SSL3 and TLS1.0. A new API was added to specify the min/max of the allowed range, SSL_VersionRangeSet. We need that in order to be able to enable the client to use TLS v1.1 and TLS v1.2

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


How reproducible:

Steps to Reproduce:
1. Install IPA server
2. Update /etc/httpd/conf.d/nss.conf and set NSSProtocol to TLSv1.1
3. ipa -vv user-show admin

Actual results:

(SSL_ERROR_PROTOCOL_VERSION_ALERT) Peer reports incompatible or unsupported protocol version.

This is because only SSL3 and TLSv1 are enabled by default and there is no mechanism to enable them.

Comment 1 John Dennis 2014-10-22 16:28:04 UTC
Rob, there is a Fedora scratch build here for a trial 0.16.0 version:


It includes all the SSL version range API calls (as well as the ability to set trust properites on Certificates that someone else had requested). Examples of using the SSL version range stuff can be found in doc/examples/ssl_version_range.py

I'd rather not go through the effort of doing an official Mozilla release and RHEL builds until you sanity check this trial version. Would you please do that and report back? Thanks!

Comment 2 John Dennis 2014-10-27 14:55:28 UTC
In IRC Rob asked to augment the new verson with support for


In addition to that


was added which can be querried off a SSLSocket object, also SSLSocket.get_negotiated_host() was added.

However the information in SSLCipherSuiteInfo and SSLChannelInfo is often best combined together in an integrated fashion so SSLSocket now also supports a connection_info_str() method which dumps out the information on the parameters of the SSL connection as it was established. For example if you have a handshake callback you could dump information this way:

def handshake_callback(sock):
    print "-- handshake complete --"
    print "peer: %s" % (sock.get_peer_name())
    print "negotiated host: %s" % (sock.get_negotiated_host())
    print sock.connection_info_str()
    print "-- handshake complete --"

An example of which is shown below:

-- handshake complete --
negotiated host: www.verisign.com

SSL Protocol Version: 3.1 (tls1.0)
Cipher:               128-bit AES
MAC:                  160-bit SHA1
Auth:                 2048-bit RSA
Key Exchange:         1024-bit DHE
Compression:          NULL
-- handshake complete --

Of course all the individual data items from SSLCipherSuiteInfo and SSLConnectionInfo can be directly accessed as well as printed in a friendly form. 

In all 46 new methods were added to support the above.

It should now be version easy when trying to establish the SSL protocol version to see the exact SSL connection and cipher parameters in use.

Also when using SSLCipherSuiteInfo don't forget there has always been a tuple of supported ssl cipher suites avalable as


and dumping them is now as simple as:

for cipher in ssl.ssl_implemented_ciphers:
    suite_info = ssl.get_cipher_suite_info(cipher)
    print suite_info

A scratch build and the updated SRPM can be found here:


Please test and report.

Comment 3 John Dennis 2014-10-27 21:13:41 UTC
My appologies, the scratch build and SRPM mentioned in comment #2 was incorrect

The correct scratch build and the updated SRPM can be found here:


Comment 4 Rob Crittenden 2014-10-28 18:37:25 UTC
Tested out in ipa tool ok for me.

Comment 11 errata-xmlrpc 2015-07-22 06:34:05 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.


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