diff options
author | chhsiao90 <chhsiao90@gmail.com> | 2016-10-26 11:32:42 +0800 |
---|---|---|
committer | chhsiao90 <chhsiao90@gmail.com> | 2016-10-26 11:32:42 +0800 |
commit | 960f2e8bf0432ade836f73864e4ed33295194420 (patch) | |
tree | 869b91034f0ba3406de7a3f2b6c7cf0097096c97 /mitmproxy/connections.py | |
parent | 145c2892f720300020fdeec8a257c3247c8dff5b (diff) | |
download | mitmproxy-960f2e8bf0432ade836f73864e4ed33295194420.tar.gz mitmproxy-960f2e8bf0432ade836f73864e4ed33295194420.tar.bz2 mitmproxy-960f2e8bf0432ade836f73864e4ed33295194420.zip |
Resolved #582: display ClientConnection select cipher of TLS
Diffstat (limited to 'mitmproxy/connections.py')
-rw-r--r-- | mitmproxy/connections.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mitmproxy/connections.py b/mitmproxy/connections.py index 1c35ec7f..89c6b501 100644 --- a/mitmproxy/connections.py +++ b/mitmproxy/connections.py @@ -21,6 +21,7 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject): timestamp_ssl_setup: TLS established timestamp timestamp_end: Connection end timestamp sni: Server Name Indication sent by client during the TLS handshake + cipher_name: The current used cipher """ def __init__(self, client_connection, address, server): @@ -42,6 +43,7 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject): self.timestamp_ssl_setup = None self.protocol = None self.sni = None + self.cipher_name = None def __bool__(self): return bool(self.connection) and not self.finished @@ -64,6 +66,7 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject): timestamp_ssl_setup=float, timestamp_end=float, sni=str, + cipher_name=str, ) def copy(self): @@ -90,13 +93,15 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject): timestamp_start=None, timestamp_end=None, timestamp_ssl_setup=None, - sni=None + sni=None, + cipher_name=None, )) def convert_to_ssl(self, *args, **kwargs): super().convert_to_ssl(*args, **kwargs) self.timestamp_ssl_setup = time.time() self.sni = self.connection.get_servername() + self.cipher_name = self.connection.get_cipher_name() def finish(self): super().finish() |