diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-08-03 02:01:40 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-08-03 02:01:40 +0200 |
commit | 10a6d4fbe5a910b75813edc1bf8f22eec3b8bf3c (patch) | |
tree | bedf4882f3cfaec91e7ec753f422f74d972685d0 /libmproxy | |
parent | e9401a2123f416f8dd4c24bb4bbc74f297369133 (diff) | |
download | mitmproxy-10a6d4fbe5a910b75813edc1bf8f22eec3b8bf3c.tar.gz mitmproxy-10a6d4fbe5a910b75813edc1bf8f22eec3b8bf3c.tar.bz2 mitmproxy-10a6d4fbe5a910b75813edc1bf8f22eec3b8bf3c.zip |
fix #317
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/proxy/server.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmproxy/proxy/server.py b/libmproxy/proxy/server.py index 50f01bdc..c817b3b5 100644 --- a/libmproxy/proxy/server.py +++ b/libmproxy/proxy/server.py @@ -238,12 +238,12 @@ class ConnectionHandler: else: host = self.server_conn.address.host sans = [] - if not self.config.no_upstream_cert and self.server_conn.ssl_established: + if self.server_conn.ssl_established and (not self.config.no_upstream_cert): upstream_cert = self.server_conn.cert if upstream_cert.cn: host = upstream_cert.cn.decode("utf8").encode("idna") sans = upstream_cert.altnames - elif self.config.no_upstream_cert and self.sni: + elif self.sni: sans = [self.sni] ret = self.config.certstore.get_cert(host, sans) |