|
|
90fa17 |
diff -up M2Crypto-0.20.2/M2Crypto/SSL/Connection.py.check M2Crypto-0.20.2/M2Crypto/SSL/Connection.py
|
|
|
90fa17 |
--- M2Crypto-0.20.2/M2Crypto/SSL/Connection.py.check 2010-07-09 00:05:56.000000000 +0200
|
|
|
90fa17 |
+++ M2Crypto-0.20.2/M2Crypto/SSL/Connection.py 2010-07-09 00:08:20.677169899 +0200
|
|
|
90fa17 |
@@ -54,6 +54,10 @@ class Connection:
|
|
|
90fa17 |
|
|
|
90fa17 |
self.ssl_close_flag = m2.bio_noclose
|
|
|
90fa17 |
|
|
|
90fa17 |
+ if self.ctx.post_connection_check is not None:
|
|
|
90fa17 |
+ self.set_post_connection_check_callback \
|
|
|
90fa17 |
+ (self.ctx.post_connection_check)
|
|
|
90fa17 |
+
|
|
|
90fa17 |
|
|
|
90fa17 |
def __del__(self):
|
|
|
90fa17 |
if getattr(self, 'sslbio', None):
|
|
|
90fa17 |
diff -up M2Crypto-0.20.2/M2Crypto/SSL/Context.py.check M2Crypto-0.20.2/M2Crypto/SSL/Context.py
|
|
|
90fa17 |
--- M2Crypto-0.20.2/M2Crypto/SSL/Context.py.check 2009-10-07 06:24:28.000000000 +0200
|
|
|
90fa17 |
+++ M2Crypto-0.20.2/M2Crypto/SSL/Context.py 2010-07-09 00:06:47.551169489 +0200
|
|
|
90fa17 |
@@ -36,12 +36,14 @@ class Context:
|
|
|
90fa17 |
|
|
|
90fa17 |
m2_ssl_ctx_free = m2.ssl_ctx_free
|
|
|
90fa17 |
|
|
|
90fa17 |
- def __init__(self, protocol='sslv23', weak_crypto=None):
|
|
|
90fa17 |
+ def __init__(self, protocol='sslv23', weak_crypto=None,
|
|
|
90fa17 |
+ post_connection_check=None):
|
|
|
90fa17 |
proto = getattr(m2, protocol + '_method', None)
|
|
|
90fa17 |
if proto is None:
|
|
|
90fa17 |
raise ValueError, "no such protocol '%s'" % protocol
|
|
|
90fa17 |
self.ctx = m2.ssl_ctx_new(proto())
|
|
|
90fa17 |
self.allow_unknown_ca = 0
|
|
|
90fa17 |
+ self.post_connection_check = post_connection_check
|
|
|
90fa17 |
map()[long(self.ctx)] = self
|
|
|
90fa17 |
m2.ssl_ctx_set_cache_size(self.ctx, 128L)
|
|
|
90fa17 |
if weak_crypto is None:
|