diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-02-26 11:35:35 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 11:35:35 +1300 |
commit | 494390bf07a96e911d0b09754d769100f9301b1d (patch) | |
tree | 807338895f991e020341d747822db4a6484c263b | |
parent | 469ffe32af5dc2d8d253f85a96b370e45b0e6a71 (diff) | |
parent | 820ccc69da0dac66c027c6691833592a9fba2f09 (diff) | |
download | mitmproxy-494390bf07a96e911d0b09754d769100f9301b1d.tar.gz mitmproxy-494390bf07a96e911d0b09754d769100f9301b1d.tar.bz2 mitmproxy-494390bf07a96e911d0b09754d769100f9301b1d.zip |
Merge pull request #2925 from mhils/clientcert-from-sni
Use sni to select clientcerts
-rw-r--r-- | mitmproxy/connections.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/connections.py b/mitmproxy/connections.py index 9c47985c..e8fc4fbf 100644 --- a/mitmproxy/connections.py +++ b/mitmproxy/connections.py @@ -286,7 +286,8 @@ class ServerConnection(tcp.TCPClient, stateobject.StateObject): else: path = os.path.join( client_certs, - self.address[0].encode("idna").decode()) + ".pem" + (sni or self.address[0].encode("idna").decode()) + ".pem" + ) if os.path.exists(path): client_cert = path |