aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/connections.py
diff options
context:
space:
mode:
authorDaniel Lenski <daniel.lenski@finalphasesystems.com>2017-02-12 13:28:24 -0800
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2017-02-21 20:57:29 +0100
commit48b3d1af2fb43f119e0c011e2350728169c82acd (patch)
tree9e92c77750692cf7b0bb7a7fe37b922d16bfb3fd /mitmproxy/connections.py
parentcf0bce77a91406681cf9fdc848d4b5e7b2da51a7 (diff)
downloadmitmproxy-48b3d1af2fb43f119e0c011e2350728169c82acd.tar.gz
mitmproxy-48b3d1af2fb43f119e0c011e2350728169c82acd.tar.bz2
mitmproxy-48b3d1af2fb43f119e0c011e2350728169c82acd.zip
store generated cert for each flow
fixes #1935
Diffstat (limited to 'mitmproxy/connections.py')
-rw-r--r--mitmproxy/connections.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mitmproxy/connections.py b/mitmproxy/connections.py
index a32889bd..6d4d648f 100644
--- a/mitmproxy/connections.py
+++ b/mitmproxy/connections.py
@@ -17,6 +17,7 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject):
address: Remote address
ssl_established: True if TLS is established, False otherwise
clientcert: The TLS client certificate
+ mitmcert: The MITM'ed TLS server certificate presented to the client
timestamp_start: Connection start timestamp
timestamp_ssl_setup: TLS established timestamp
timestamp_end: Connection end timestamp
@@ -40,6 +41,7 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject):
self.clientcert = None
self.ssl_established = None
+ self.mitmcert = None
self.timestamp_start = time.time()
self.timestamp_end = None
self.timestamp_ssl_setup = None
@@ -72,6 +74,7 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject):
address=tcp.Address,
ssl_established=bool,
clientcert=certs.SSLCert,
+ mitmcert=certs.SSLCert,
timestamp_start=float,
timestamp_ssl_setup=float,
timestamp_end=float,
@@ -98,6 +101,7 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject):
return cls.from_state(dict(
address=dict(address=address, use_ipv6=False),
clientcert=None,
+ mitmcert=None,
ssl_established=False,
timestamp_start=None,
timestamp_end=None,