aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/tcp.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-08 13:25:42 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-08 13:25:42 +0200
commitabbe88c8ce4f19de33723ac0828cd24b8ec5f38b (patch)
tree07b5dac8d3a1156bdc585362b131db4ee1a56692 /netlib/tcp.py
parent6b9c2739c20c4c4115e49b5c120554ec89da8c38 (diff)
downloadmitmproxy-abbe88c8ce4f19de33723ac0828cd24b8ec5f38b.tar.gz
mitmproxy-abbe88c8ce4f19de33723ac0828cd24b8ec5f38b.tar.bz2
mitmproxy-abbe88c8ce4f19de33723ac0828cd24b8ec5f38b.zip
fix non-ALPN supported OpenSSL-related tests
Diffstat (limited to 'netlib/tcp.py')
-rw-r--r--netlib/tcp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py
index fc2ce115..09c43ffc 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -499,7 +499,10 @@ class TCPClient(_Connection):
return self.connection.gettimeout()
def get_alpn_proto_negotiated(self):
- return self.connection.get_alpn_proto_negotiated()
+ if OpenSSL._util.lib.Cryptography_HAS_ALPN:
+ return self.connection.get_alpn_proto_negotiated()
+ else:
+ return None
class BaseHandler(_Connection):