diff options
| -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 | 
