aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-11-26 23:13:06 +0100
committerMaximilian Hils <git@maximilianhils.com>2015-11-26 23:13:06 +0100
commit89013eb7af785eb9cfa3da3ae8d6c4b78b974846 (patch)
tree31da8dada1a05dd55626b82e78e482d162a8c100
parent3eea7f12162804dcf472740209ac340f7b6c4ba9 (diff)
downloadmitmproxy-89013eb7af785eb9cfa3da3ae8d6c4b78b974846.tar.gz
mitmproxy-89013eb7af785eb9cfa3da3ae8d6c4b78b974846.tar.bz2
mitmproxy-89013eb7af785eb9cfa3da3ae8d6c4b78b974846.zip
establish tls with client even if server connection fails
-rw-r--r--libmproxy/protocol/tls.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/libmproxy/protocol/tls.py b/libmproxy/protocol/tls.py
index 9764fb22..871926ee 100644
--- a/libmproxy/protocol/tls.py
+++ b/libmproxy/protocol/tls.py
@@ -379,11 +379,10 @@ class TlsLayer(Layer):
return choice
def _establish_tls_with_client_and_server(self):
- self.ctx.connect()
-
# If establishing TLS with the server fails, we try to establish TLS with the client nonetheless
# to send an error message over TLS.
try:
+ self.ctx.connect()
self._establish_tls_with_server()
except Exception as e:
try: