aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_certutils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-07-24 14:55:54 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-07-24 14:55:54 +1200
commit728ef107a00e7d6cef0c7d826f39a89197ddb732 (patch)
treeeafcd0ef3fdfc0322e0adf28d8294db847a8c111 /test/test_certutils.py
parent91752990d5863526745e5c31cfb4b7459d11047e (diff)
downloadmitmproxy-728ef107a00e7d6cef0c7d826f39a89197ddb732.tar.gz
mitmproxy-728ef107a00e7d6cef0c7d826f39a89197ddb732.tar.bz2
mitmproxy-728ef107a00e7d6cef0c7d826f39a89197ddb732.zip
Ignore SAN entries that we don't understand.
Diffstat (limited to 'test/test_certutils.py')
-rw-r--r--test/test_certutils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_certutils.py b/test/test_certutils.py
index 8f95be67..9b8e7085 100644
--- a/test/test_certutils.py
+++ b/test/test_certutils.py
@@ -67,6 +67,11 @@ class TestSSLCert:
assert c.to_pem()
c.has_expired
+ def test_err_broken_sans(self):
+ c = certutils.SSLCert.from_pem(file(tutils.test_data.path("data/text_cert_weird1"), "r").read())
+ # This breaks unless we ignore a decoding error.
+ c.altnames
+
def test_der(self):
d = file(tutils.test_data.path("data/dercert")).read()
s = certutils.SSLCert.from_der(d)