aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-12-01 14:31:51 +0100
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-12-02 11:58:20 +0100
commit1fcf79fff049859e97559a19264203b89eb42775 (patch)
tree49871644c8fac3948c63a0a682833085610b0de6
parentd658783dec7e486003704b3d0cd24b9c5148e903 (diff)
downloadmitmproxy-1fcf79fff049859e97559a19264203b89eb42775.tar.gz
mitmproxy-1fcf79fff049859e97559a19264203b89eb42775.tar.bz2
mitmproxy-1fcf79fff049859e97559a19264203b89eb42775.zip
fix ALPN usage
-rw-r--r--mitmproxy/proxy/protocol/tls.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/proxy/protocol/tls.py b/mitmproxy/proxy/protocol/tls.py
index 82c9d096..c6dc2c33 100644
--- a/mitmproxy/proxy/protocol/tls.py
+++ b/mitmproxy/proxy/protocol/tls.py
@@ -503,7 +503,7 @@ class TlsLayer(base.Layer):
if alpn and b"h2" in alpn and not self.config.options.http2:
alpn.remove(b"h2")
- if self.client_conn.ssl_established and self.client_conn.connection.get_alpn_proto_negotiated():
+ if self.client_conn.ssl_established and self.client_conn.get_alpn_proto_negotiated():
# If the client has already negotiated an ALP, then force the
# server to use the same. This can only happen if the host gets
# changed after the initial connection was established. E.g.:
@@ -512,7 +512,7 @@ class TlsLayer(base.Layer):
# * then the first server connection negotiates http/1.1,
# * but after the server_conn change, the new host offers h2
# * which results in garbage because the layers don' match.
- alpn = [self.client_conn.connection.get_alpn_proto_negotiated()]
+ alpn = [self.client_conn.get_alpn_proto_negotiated()]
ciphers_server = self.config.options.ciphers_server
if not ciphers_server and self._client_tls: