From 091e539a0203ca272e3a4ba2a9f23331bbd85005 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 2 Mar 2014 13:45:35 +1300 Subject: 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 --- test/tutils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/tutils.py') 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): -- cgit v1.2.3