mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-02 18:57:22 +00:00
fix #317
This commit is contained in:
parent
e9401a2123
commit
10a6d4fbe5
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue