diff options
author | David Weinstein <dweinst@insitusec.com> | 2016-01-26 12:29:02 -0500 |
---|---|---|
committer | David Weinstein <dweinst@insitusec.com> | 2016-01-26 12:38:00 -0500 |
commit | 8f8c2efccd52f9791cc5990f9863cdd02617bc0d (patch) | |
tree | f62f115c9cdc5dc811667d9ed90bf29be3ba70a9 /libmproxy/protocol/tls.py | |
parent | 7d69c3480b6dcc75987958e06b4ee828c07249a9 (diff) | |
download | mitmproxy-8f8c2efccd52f9791cc5990f9863cdd02617bc0d.tar.gz mitmproxy-8f8c2efccd52f9791cc5990f9863cdd02617bc0d.tar.bz2 mitmproxy-8f8c2efccd52f9791cc5990f9863cdd02617bc0d.zip |
Include raw client hello in exception
Diffstat (limited to 'libmproxy/protocol/tls.py')
-rw-r--r-- | libmproxy/protocol/tls.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmproxy/protocol/tls.py b/libmproxy/protocol/tls.py index 0b47af78..6d4cac85 100644 --- a/libmproxy/protocol/tls.py +++ b/libmproxy/protocol/tls.py @@ -283,13 +283,13 @@ class TlsClientHello(object): try: raw_client_hello = get_client_hello(client_conn)[4:] # exclude handshake header. except ProtocolException as e: - raise TlsProtocolException('Cannot parse Client Hello: %s' % repr(e)) + raise TlsProtocolException('Cannot read raw Client Hello: %s' % repr(e)) try: return cls(raw_client_hello) except ConstructError as e: - #self.log("Raw Client Hello: %s" % raw_client_hello.encode("hex"), "debug") - raise TlsProtocolException('Cannot parse Client Hello: %s' % repr(e)) + raise TlsProtocolException('Cannot parse Client Hello: %s, Raw Client Hello: %s' % \ + (repr(e), raw_client_hello.encode("hex"))) def __repr__(self): return "TlsClientHello( sni: %s alpn_protocols: %s, cipher_suites: %s)" % \ |