mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
close the client connection if TLS ClientHello parsing fails
This commit is contained in:
parent
f026285434
commit
79778071cf
@ -242,6 +242,8 @@ class TlsLayer(base.Layer):
|
|||||||
self._client_hello = net_tls.ClientHello.from_file(self.client_conn.rfile)
|
self._client_hello = net_tls.ClientHello.from_file(self.client_conn.rfile)
|
||||||
except exceptions.TlsProtocolException as e:
|
except exceptions.TlsProtocolException as e:
|
||||||
self.log("Cannot parse Client Hello: %s" % repr(e), "error")
|
self.log("Cannot parse Client Hello: %s" % repr(e), "error")
|
||||||
|
# Without knowning the ClientHello we cannot proceed in this connection.
|
||||||
|
return
|
||||||
|
|
||||||
# Do we need to do a server handshake now?
|
# Do we need to do a server handshake now?
|
||||||
# There are two reasons why we would want to establish TLS with the server now:
|
# There are two reasons why we would want to establish TLS with the server now:
|
||||||
|
Loading…
Reference in New Issue
Block a user