diff options
author | Martin Kosek <mkosek@redhat.com> | 2014-07-02 14:40:45 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-07-02 16:31:50 +0200 |
commit | c4b63dc48a4ab6d4a9b7e824dba23a806fd6d741 (patch) | |
tree | ce7b2444d808ba1bf3870823a90c4bb0970fefbe /ipapython | |
parent | 8c98561c209d0ccaa692a335e3e9a10aec23ee0e (diff) | |
download | freeipa-c4b63dc48a4ab6d4a9b7e824dba23a806fd6d741.tar.gz freeipa-c4b63dc48a4ab6d4a9b7e824dba23a806fd6d741.tar.xz freeipa-c4b63dc48a4ab6d4a9b7e824dba23a806fd6d741.zip |
Clear NSS session cache when socket is closed
Even when NSS connection is closed, there may be still cached
certificates in the NSS lib. This may cause subsequent NSS
initialization to crash. This problem especially reproduces in the
unit tests.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r-- | ipapython/nsslib.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ipapython/nsslib.py b/ipapython/nsslib.py index 22c81c0d6..93b0c56fc 100644 --- a/ipapython/nsslib.py +++ b/ipapython/nsslib.py @@ -247,6 +247,7 @@ class NSSConnection(httplib.HTTPConnection, NSSAddressFamilyFallback): if self.sock: self.sock.close() # close it manually... there may be other refs self.sock = None + ssl.clear_session_cache() def endheaders(self, message=None): """ |