aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_proxy.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-03-05 17:25:12 +1300
committerAldo Cortesi <aldo@nullcube.com>2014-03-05 17:28:04 +1300
commitd65f2215cb9191a24b36ad6a4fcbf474798d3b2d (patch)
treece2c0a84fa3e011abcd521a85b507d9bc62fd198 /test/test_proxy.py
parent32af66881465ae98a53665c8ddd42c02aaf492f7 (diff)
downloadmitmproxy-d65f2215cb9191a24b36ad6a4fcbf474798d3b2d.tar.gz
mitmproxy-d65f2215cb9191a24b36ad6a4fcbf474798d3b2d.tar.bz2
mitmproxy-d65f2215cb9191a24b36ad6a4fcbf474798d3b2d.zip
Much more sophisticated cert handling
- Specify per-domain certificates and keys - Certs are no longer regenerated for SANs - And more. :)
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r--test/test_proxy.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 5ff00290..b15e3f84 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -70,13 +70,6 @@ class TestProcessProxyOptions:
def test_simple(self):
assert self.p()
- def test_certfile_keyfile(self):
- self.assert_noerr("--certfile", tutils.test_data.path("data/testkey.pem"))
- self.assert_err("does not exist", "--certfile", "nonexistent")
-
- self.assert_noerr("--keyfile", tutils.test_data.path("data/testkey.pem"))
- self.assert_err("does not exist", "--keyfile", "nonexistent")
-
def test_confdir(self):
with tutils.tmpdir() as confdir:
self.assert_noerr("--confdir", confdir)
@@ -93,11 +86,16 @@ class TestProcessProxyOptions:
self.assert_err("invalid reverse proxy", "-P", "reverse")
self.assert_noerr("-P", "http://localhost")
- def test_certs(self):
+ def test_client_certs(self):
with tutils.tmpdir() as confdir:
self.assert_noerr("--client-certs", confdir)
self.assert_err("directory does not exist", "--client-certs", "nonexistent")
+ def test_certs(self):
+ with tutils.tmpdir() as confdir:
+ self.assert_noerr("--cert", tutils.test_data.path("data/testkey.pem"))
+ self.assert_err("does not exist", "--cert", "nonexistent")
+
def test_auth(self):
p = self.assert_noerr("--nonanonymous")
assert p.authenticator