diff options
author | Maximilian Hils <git@maximilianhils.com> | 2018-01-13 00:10:29 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2018-01-13 00:10:47 +0100 |
commit | 93d9640ea525b319589205a2d1ac27fad9f8a348 (patch) | |
tree | 95fe839dccde627313c40d3b7f5ae118504c0be7 /mitmproxy/proxy | |
parent | fc80aa562e5fdd239c82aab1ac73502adb4f67dd (diff) | |
download | mitmproxy-93d9640ea525b319589205a2d1ac27fad9f8a348.tar.gz mitmproxy-93d9640ea525b319589205a2d1ac27fad9f8a348.tar.bz2 mitmproxy-93d9640ea525b319589205a2d1ac27fad9f8a348.zip |
improve net.tls.ClientHello API, fix bugs, add tests
Diffstat (limited to 'mitmproxy/proxy')
-rw-r--r-- | mitmproxy/proxy/protocol/tls.py | 2 | ||||
-rw-r--r-- | mitmproxy/proxy/root_context.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/proxy/protocol/tls.py b/mitmproxy/proxy/protocol/tls.py index 63023871..d04c9801 100644 --- a/mitmproxy/proxy/protocol/tls.py +++ b/mitmproxy/proxy/protocol/tls.py @@ -242,7 +242,7 @@ class TlsLayer(base.Layer): if self._client_tls: # Peek into the connection, read the initial client hello and parse it to obtain SNI and ALPN values. try: - self._client_hello = net_tls.ClientHello.from_client_conn(self.client_conn) + self._client_hello = net_tls.ClientHello.from_file(self.client_conn.rfile) except exceptions.TlsProtocolException as e: self.log("Cannot parse Client Hello: %s" % repr(e), "error") diff --git a/mitmproxy/proxy/root_context.py b/mitmproxy/proxy/root_context.py index 0af8b364..eb0008cf 100644 --- a/mitmproxy/proxy/root_context.py +++ b/mitmproxy/proxy/root_context.py @@ -53,7 +53,7 @@ class RootContext: ignore = self.config.check_ignore(top_layer.server_conn.address) if not ignore and client_tls: try: - client_hello = tls.ClientHello.from_client_conn(self.client_conn) + client_hello = tls.ClientHello.from_file(self.client_conn.rfile) except exceptions.TlsProtocolException as e: self.log("Cannot parse Client Hello: %s" % repr(e), "error") else: |