diff options
author | Abhigyan Khaund <20434085+abhigyank@users.noreply.github.com> | 2018-11-11 10:58:14 +0530 |
---|---|---|
committer | Abhigyan Khaund <20434085+abhigyank@users.noreply.github.com> | 2018-11-11 10:58:14 +0530 |
commit | cda4248610a802c8e97b9917fd44d264dcb06584 (patch) | |
tree | 8346169e6f427c24f3f14f567476fe39f57d3085 /mitmproxy/proxy | |
parent | d4f4cfe2252ac82bc361c098e7fba48d70466890 (diff) | |
download | mitmproxy-cda4248610a802c8e97b9917fd44d264dcb06584.tar.gz mitmproxy-cda4248610a802c8e97b9917fd44d264dcb06584.tar.bz2 mitmproxy-cda4248610a802c8e97b9917fd44d264dcb06584.zip |
Change variable o to organization for generated certficates.
Diffstat (limited to 'mitmproxy/proxy')
-rw-r--r-- | mitmproxy/proxy/protocol/tls.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mitmproxy/proxy/protocol/tls.py b/mitmproxy/proxy/protocol/tls.py index 3577af13..096aae9f 100644 --- a/mitmproxy/proxy/protocol/tls.py +++ b/mitmproxy/proxy/protocol/tls.py @@ -464,12 +464,12 @@ class TlsLayer(base.Layer): def _find_cert(self): """ - This function determines the Common Name (CN) and Subject Alternative Names (SANs) + This function determines the Common Name (CN), Subject Alternative Names (SANs) and Organization Name our certificate should have and then fetches a matching cert from the certstore. """ host = None sans = set() - o = None + organization = None # In normal operation, the server address should always be known at this point. # However, we may just want to establish TLS so that we can send an error message to the client, @@ -489,8 +489,8 @@ class TlsLayer(base.Layer): if upstream_cert.cn: sans.add(host) host = upstream_cert.cn.decode("utf8").encode("idna") - if upstream_cert.o: - o = upstream_cert.o + if upstream_cert.organization: + organization = upstream_cert.organization # Also add SNI values. if self._client_hello.sni: sans.add(self._client_hello.sni.encode("idna")) @@ -501,4 +501,4 @@ class TlsLayer(base.Layer): # In other words, the Common Name is irrelevant then. if host: sans.add(host) - return self.config.certstore.get_cert(host, list(sans), o) + return self.config.certstore.get_cert(host, list(sans), organization) |