diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-11-27 21:20:00 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-11-27 21:21:04 +0100 |
commit | 43ed82062f400e9c6e1bf59ce2e3fd29bf0cb09c (patch) | |
tree | 73a3a9a26b8cb627011405e796318c31537ad85d /libmproxy | |
parent | 6b92497d4f1d9fc0a98c42f66ab2bf81e8fa2fc7 (diff) | |
download | mitmproxy-43ed82062f400e9c6e1bf59ce2e3fd29bf0cb09c.tar.gz mitmproxy-43ed82062f400e9c6e1bf59ce2e3fd29bf0cb09c.tar.bz2 mitmproxy-43ed82062f400e9c6e1bf59ce2e3fd29bf0cb09c.zip |
fix #847
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/contrib/tls/_constructs.py | 4 | ||||
-rw-r--r-- | libmproxy/protocol/tls.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libmproxy/contrib/tls/_constructs.py b/libmproxy/contrib/tls/_constructs.py index 9c57a799..4cb7d382 100644 --- a/libmproxy/contrib/tls/_constructs.py +++ b/libmproxy/contrib/tls/_constructs.py @@ -5,7 +5,7 @@ from __future__ import absolute_import, division, print_function from construct import (Array, Bytes, Struct, UBInt16, UBInt32, UBInt8, PascalString, Embed, TunnelAdapter, GreedyRange, - Switch, OptionalGreedyRange) + Switch, OptionalGreedyRange, Optional) from .utils import UBInt24 @@ -112,7 +112,7 @@ Extension = Struct( ) extensions = TunnelAdapter( - PascalString("extensions", length_field=UBInt16("extensions_length")), + Optional(PascalString("extensions", length_field=UBInt16("extensions_length"))), OptionalGreedyRange(Extension) ) diff --git a/libmproxy/protocol/tls.py b/libmproxy/protocol/tls.py index 871926ee..ed747643 100644 --- a/libmproxy/protocol/tls.py +++ b/libmproxy/protocol/tls.py @@ -318,7 +318,7 @@ class TlsLayer(Layer): client_hello = ClientHello.parse(raw_client_hello) except ConstructError as e: self.log("Cannot parse Client Hello: %s" % repr(e), "error") - self.log("Raw Client Hello:\r\n:%s" % raw_client_hello.encode("hex"), "debug") + self.log("Raw Client Hello: %s" % raw_client_hello.encode("hex"), "debug") return self.client_ciphers = client_hello.cipher_suites.cipher_suites |