aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2018-02-25 22:19:14 +0100
committerMaximilian Hils <git@maximilianhils.com>2018-02-25 22:19:14 +0100
commit820ccc69da0dac66c027c6691833592a9fba2f09 (patch)
tree14eea8de54fb9391b1883182f137b14858def7e3
parenta9b8d85e99936aec370c79fdce3f10547a353199 (diff)
downloadmitmproxy-820ccc69da0dac66c027c6691833592a9fba2f09.tar.gz
mitmproxy-820ccc69da0dac66c027c6691833592a9fba2f09.tar.bz2
mitmproxy-820ccc69da0dac66c027c6691833592a9fba2f09.zip
use sni to select clientcerts
-rw-r--r--mitmproxy/connections.py3
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