diff options
author | Christophe Haen <christophe.haen@cern.ch> | 2020-06-15 16:10:53 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2020-07-13 22:37:41 +0200 |
commit | 35d463d8eee7f9ab5d2b431caad8f4cd4dd0f946 (patch) | |
tree | 397ce5f1f529fdd18f9724f245ef0b5601fa78d8 /M2Crypto/SSL | |
parent | abd5e522153f78c29bf22d6a5cca2b68bc2c0edd (diff) | |
download | m2crypto-35d463d8eee7f9ab5d2b431caad8f4cd4dd0f946.tar.gz |
SSL.Connection: make the clientPostConnectionCheck an instance attribute
Diffstat (limited to 'M2Crypto/SSL')
-rw-r--r-- | M2Crypto/SSL/Connection.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/M2Crypto/SSL/Connection.py b/M2Crypto/SSL/Connection.py index 45b3ee6..a5863ff 100644 --- a/M2Crypto/SSL/Connection.py +++ b/M2Crypto/SSL/Connection.py @@ -37,7 +37,6 @@ def _serverPostConnectionCheck(*args, **kw): class Connection(object): """An SSL connection.""" - clientPostConnectionCheck = Checker.Checker() serverPostConnectionCheck = _serverPostConnectionCheck m2_bio_free = m2.bio_free @@ -52,6 +51,10 @@ class Connection(object): :param sock: socket to be used :param family: socket family """ + # The Checker needs to be an instance attribute + # and not a class attribute for thread safety reason + self.clientPostConnectionCheck = Checker.Checker() + self.ctx = ctx self.ssl = m2.ssl_new(self.ctx.ctx) # type: bytes if sock is not None: |