diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-12-05 10:09:32 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-12-06 19:51:57 +0100 |
commit | 47196e86760122bb21227b8241a3fcd6272d85ac (patch) | |
tree | 9b11a24ca2f62a95989f3b75ed6c2ba482138a87 /mitmproxy/contrib | |
parent | e44493bda58d38b6349f84cc62795a47819d9a68 (diff) | |
download | mitmproxy-47196e86760122bb21227b8241a3fcd6272d85ac.tar.gz mitmproxy-47196e86760122bb21227b8241a3fcd6272d85ac.tar.bz2 mitmproxy-47196e86760122bb21227b8241a3fcd6272d85ac.zip |
tls_parser: allow optional extensions
fixes #1816
Diffstat (limited to 'mitmproxy/contrib')
-rw-r--r-- | mitmproxy/contrib/tls/__init__.py | 4 | ||||
-rw-r--r-- | mitmproxy/contrib/tls_parser.py (renamed from mitmproxy/contrib/tls/_constructs.py) | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/mitmproxy/contrib/tls/__init__.py b/mitmproxy/contrib/tls/__init__.py deleted file mode 100644 index 450986f7..00000000 --- a/mitmproxy/contrib/tls/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - diff --git a/mitmproxy/contrib/tls/_constructs.py b/mitmproxy/contrib/tls_parser.py index 8b3f12af..61fb3e3e 100644 --- a/mitmproxy/contrib/tls/_constructs.py +++ b/mitmproxy/contrib/tls_parser.py @@ -1,3 +1,6 @@ +# This file originally comes from https://github.com/pyca/tls/blob/master/tls/_constructs.py. +# Modified by the mitmproxy team. + # This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. @@ -113,9 +116,11 @@ Extension = "Extension" / Struct( ) ) -extensions = "extensions" / Struct( - Int16ub, - "extensions" / GreedyRange(Extension) +extensions = "extensions" / Optional( + Struct( + Int16ub, + "extensions" / GreedyRange(Extension) + ) ) ClientHello = "ClientHello" / Struct( |