diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-03-18 16:45:31 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-03-18 16:45:31 +1300 |
commit | e22fd74d06bf646e7da95cde8f7238763f081276 (patch) | |
tree | 46b8bd42a25a45066c80a7ed4204ac9db2777c04 /test | |
parent | 3fbf343985cd1a957514ebcc54fee067c18b99ea (diff) | |
download | mitmproxy-e22fd74d06bf646e7da95cde8f7238763f081276.tar.gz mitmproxy-e22fd74d06bf646e7da95cde8f7238763f081276.tar.bz2 mitmproxy-e22fd74d06bf646e7da95cde8f7238763f081276.zip |
Revamp key generation.
We now create three different files in the .mitmproxy directory when a dummy CA
is made:
mitmproxy-ca.pem - the CA, including private key
mitmproxy-ca-cert.p12 - A pkcs12 version of the certificate, for distribution to Windows.
mitmproxy-ca-cert.pem - A PEM version of the certificate, for distribution to everyone else.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_utils.py | 6 | ||||
-rw-r--r-- | test/tutils.py | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index 434d6b26..94523676 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -281,6 +281,12 @@ class udummy_ca(libpry.AutoTree): assert utils.dummy_ca(path) assert os.path.exists(path) + path = os.path.join(d, "foo/cert2.pem") + assert utils.dummy_ca(path) + assert os.path.exists(path) + assert os.path.exists(os.path.join(d, "foo/cert2-cert.pem")) + assert os.path.exists(os.path.join(d, "foo/cert2-cert.p12")) + class udummy_cert(libpry.AutoTree): def test_with_ca(self): diff --git a/test/tutils.py b/test/tutils.py index ae9dea27..fea7f224 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -43,7 +43,7 @@ HTTPS_PORT = random.randint(30000, 40000) class TestMaster(controller.Master): def __init__(self, port, testq): - serv = proxy.ProxyServer(proxy.Config("data/testkey.pem"), port) + serv = proxy.ProxyServer(proxy.SSLConfig("data/testkey.pem"), port) controller.Master.__init__(self, serv) self.testq = testq self.log = [] |