aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol/tls.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/protocol/tls.py')
-rw-r--r--libmproxy/protocol/tls.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/libmproxy/protocol/tls.py b/libmproxy/protocol/tls.py
index 1164681c..4f7c9300 100644
--- a/libmproxy/protocol/tls.py
+++ b/libmproxy/protocol/tls.py
@@ -416,7 +416,12 @@ class TlsLayer(Layer):
except NetLibError as e:
six.reraise(
ClientHandshakeException,
- ClientHandshakeException("Cannot establish TLS with client: %s" % repr(e), e),
+ ClientHandshakeException(
+ "Cannot establish TLS with client (sni: {sni}): {e}".format(
+ sni=self.client_sni, e=repr(e)
+ ),
+ self.client_sni or repr(self.server_conn.address)
+ ),
sys.exc_info()[2]
)
@@ -473,7 +478,7 @@ class TlsLayer(Layer):
address=repr(self.server_conn.address),
sni=self.sni_for_server_connection,
e=repr(e),
- ), e),
+ )),
sys.exc_info()[2]
)
except NetLibError as e:
@@ -483,7 +488,7 @@ class TlsLayer(Layer):
address=repr(self.server_conn.address),
sni=self.sni_for_server_connection,
e=repr(e),
- ), e),
+ )),
sys.exc_info()[2]
)