aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index a6ba790f..31308e6f 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -350,7 +350,9 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
else:
sans = []
if self.config.upstream_cert:
- host, sans = certutils.get_remote_cn(host, port)
+ cert = certutils.get_remote_cert(host, port)
+ sans = cert.altnames
+ host = cert.cn
ret = certutils.dummy_cert(self.config.certdir, self.config.cacert, host, sans)
time.sleep(self.config.cert_wait_time)
if not ret: