From 89013eb7af785eb9cfa3da3ae8d6c4b78b974846 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 26 Nov 2015 23:13:06 +0100 Subject: [PATCH] establish tls with client even if server connection fails --- libmproxy/protocol/tls.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libmproxy/protocol/tls.py b/libmproxy/protocol/tls.py index 9764fb226..871926eea 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: