aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-03-11 13:02:10 +1300
committerAldo Cortesi <aldo@nullcube.com>2014-03-11 13:02:10 +1300
commite89e035d4a2c52aff77fdb3eaa01e8bdb1539a17 (patch)
treeda9bfbee4f8316bcb6746eed175689ddd17c4ebc /test
parentc1fff51b1bf25ac048149398ae6b6dc14882a838 (diff)
downloadmitmproxy-e89e035d4a2c52aff77fdb3eaa01e8bdb1539a17.tar.gz
mitmproxy-e89e035d4a2c52aff77fdb3eaa01e8bdb1539a17.tar.bz2
mitmproxy-e89e035d4a2c52aff77fdb3eaa01e8bdb1539a17.zip
Certificate forwarding.
Diffstat (limited to 'test')
-rw-r--r--test/test_server.py7
-rw-r--r--test/tservers.py2
2 files changed, 9 insertions, 0 deletions
diff --git a/test/test_server.py b/test/test_server.py
index 43ef546d..71ca39fc 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -390,3 +390,10 @@ class TestIncompleteResponse(tservers.HTTPProxTest):
def test_incomplete(self):
assert self.pathod("200").status_code == 502
+
+class TestCertForward(tservers.HTTPProxTest):
+ certforward = True
+ ssl = True
+ def test_app_err(self):
+ tutils.raises("handshake error", self.pathod, "200:b@100")
+
diff --git a/test/tservers.py b/test/tservers.py
index 9ad3b735..7548ebc4 100644
--- a/test/tservers.py
+++ b/test/tservers.py
@@ -81,6 +81,7 @@ class ProxTestBase(object):
authenticator = None
masterclass = TestMaster
externalapp = False
+ certforward = False
@classmethod
def setupAll(cls):
cls.server = libpathod.test.Daemon(ssl=cls.ssl, ssloptions=cls.ssloptions)
@@ -91,6 +92,7 @@ class ProxTestBase(object):
no_upstream_cert = cls.no_upstream_cert,
confdir = cls.confdir,
authenticator = cls.authenticator,
+ certforward = cls.certforward,
**pconf
)
tmaster = cls.masterclass(config)