aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_certutils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-27 22:11:58 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-27 22:11:58 +1200
commitb0ef9ad07ba4b805f3130237dcf9207434c33d84 (patch)
tree06e2349c196976e2d6d909ec321aee1165e37b7d /test/test_certutils.py
parentf7fcb1c80b2874df05db4603549c6a24d12e58c0 (diff)
downloadmitmproxy-b0ef9ad07ba4b805f3130237dcf9207434c33d84.tar.gz
mitmproxy-b0ef9ad07ba4b805f3130237dcf9207434c33d84.tar.bz2
mitmproxy-b0ef9ad07ba4b805f3130237dcf9207434c33d84.zip
Refactor certutils.SSLCert API.
Diffstat (limited to 'test/test_certutils.py')
-rw-r--r--test/test_certutils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_certutils.py b/test/test_certutils.py
index 5229fc2a..85dce600 100644
--- a/test/test_certutils.py
+++ b/test/test_certutils.py
@@ -50,11 +50,11 @@ class TestDummyCert:
class TestSSLCert:
def test_simple(self):
- c = certutils.SSLCert(file(tutils.test_data.path("data/text_cert"), "r").read())
+ c = certutils.SSLCert.from_pem(file(tutils.test_data.path("data/text_cert"), "r").read())
assert c.cn == "google.com"
assert len(c.altnames) == 436
- c = certutils.SSLCert(file(tutils.test_data.path("data/text_cert_2"), "r").read())
+ c = certutils.SSLCert.from_pem(file(tutils.test_data.path("data/text_cert_2"), "r").read())
assert c.cn == "www.inode.co.nz"
assert len(c.altnames) == 2
assert c.digest("sha1")