aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-07-18 23:04:24 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-07-18 23:04:24 +0200
commitc7425f42db5f2bf300afc01d29e5a6fb2b2dfb2b (patch)
tree8f9dc443f41ca3d620ef84e4ac493c91f1da97c2 /libmproxy
parenta48cccadb5efb49db2e3007f69275614690027a1 (diff)
downloadmitmproxy-c7425f42db5f2bf300afc01d29e5a6fb2b2dfb2b.tar.gz
mitmproxy-c7425f42db5f2bf300afc01d29e5a6fb2b2dfb2b.tar.bz2
mitmproxy-c7425f42db5f2bf300afc01d29e5a6fb2b2dfb2b.zip
if no_upstream_cert is set, include SNI value als SubjectAltName, fix #291
Diffstat (limited to 'libmproxy')
-rw-r--r--libmproxy/proxy/server.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmproxy/proxy/server.py b/libmproxy/proxy/server.py
index 741e5f93..72228f16 100644
--- a/libmproxy/proxy/server.py
+++ b/libmproxy/proxy/server.py
@@ -237,6 +237,8 @@ class ConnectionHandler:
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:
+ sans = [self.sni]
ret = self.config.certstore.get_cert(host, sans)
if not ret: