Skip to content

Commit

Permalink
fix #847
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Nov 27, 2015
1 parent 6b92497 commit 43ed820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libmproxy/contrib/tls/_constructs.py
Expand Up @@ -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

Expand Down Expand Up @@ -112,7 +112,7 @@
)

extensions = TunnelAdapter(
PascalString("extensions", length_field=UBInt16("extensions_length")),
Optional(PascalString("extensions", length_field=UBInt16("extensions_length"))),
OptionalGreedyRange(Extension)
)

Expand Down
2 changes: 1 addition & 1 deletion libmproxy/protocol/tls.py
Expand Up @@ -318,7 +318,7 @@ def _parse_client_hello(self):
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
Expand Down

0 comments on commit 43ed820

Please sign in to comment.