diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-03-02 13:45:35 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-03-02 13:45:35 +1300 |
commit | 091e539a0203ca272e3a4ba2a9f23331bbd85005 (patch) | |
tree | ca907e8b2983360d666d134a5000cb6a26be6512 /test/tutils.py | |
parent | a1d0da2b533b986967a8714c02d567c943d11929 (diff) | |
download | mitmproxy-091e539a0203ca272e3a4ba2a9f23331bbd85005.tar.gz mitmproxy-091e539a0203ca272e3a4ba2a9f23331bbd85005.tar.bz2 mitmproxy-091e539a0203ca272e3a4ba2a9f23331bbd85005.zip |
Big improvements to SSL handling
- pathod now dynamically generates SSL certs, using the ~/.mitmproxy
cacert
- pathoc returns data on SSL peer certificates
- Pathod certificate CN can be specified on command line
- Support SSLv23
Diffstat (limited to 'test/tutils.py')
-rw-r--r-- | test/tutils.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/tutils.py b/test/tutils.py index 1baf16e2..2c3a2c9d 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -10,10 +10,13 @@ class DaemonTests: ssl = False timeout = None hexdump = False - not_after_connect = False + ssloptions = None @classmethod def setUpAll(self): - so = pathod.SSLOptions(not_after_connect = self.not_after_connect) + opts = self.ssloptions or {} + self.confdir = tempfile.mkdtemp() + opts["confdir"] = self.confdir + so = pathod.SSLOptions(**opts) self.d = test.Daemon( staticdir=test_data.path("data"), anchors=[("/anchor/.*", "202:da")], @@ -33,6 +36,7 @@ class DaemonTests: @classmethod def tearDownAll(self): self.d.shutdown() + shutil.rmtree(self.confdir) def setUp(self): if not (self.noweb or self.noapi): |