From 48f51849b992a9ca81beca09104b6fec0eac291c Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 27 Oct 2016 13:10:57 -0700 Subject: fix #1676 --- mitmproxy/certs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/certs.py b/mitmproxy/certs.py index 83db4e6e..4e4eb4d1 100644 --- a/mitmproxy/certs.py +++ b/mitmproxy/certs.py @@ -102,7 +102,7 @@ def dummy_cert(privkey, cacert, commonname, sans): cert.gmtime_adj_notBefore(-3600 * 48) cert.gmtime_adj_notAfter(DEFAULT_EXP) cert.set_issuer(cacert.get_subject()) - if commonname is not None: + if commonname is not None and len(commonname) < 64: cert.get_subject().CN = commonname cert.set_serial_number(int(time.time() * 10000)) if ss: -- cgit v1.2.3