From c4b63dc48a4ab6d4a9b7e824dba23a806fd6d741 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Wed, 2 Jul 2014 14:40:45 +0200 Subject: 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 --- ipapython/nsslib.py | 1 + 1 file changed, 1 insertion(+) (limited to 'ipapython') 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): """ -- cgit