From 9bd269c26a02d94f16d7c39f3cb0a4cd46bb40b1 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 20 Jan 2013 22:37:43 +1300 Subject: Add support for client certificates - pathod request logs now include a clientcert member with details on the client cert, or None if there wasn't one. - pathoc has a -C option to specify a client certificate --- test/test_pathoc.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/test_pathoc.py') diff --git a/test/test_pathoc.py b/test/test_pathoc.py index 38d3754a..2c86df11 100644 --- a/test/test_pathoc.py +++ b/test/test_pathoc.py @@ -45,6 +45,19 @@ class TestDaemonSSL(_TestDaemon): d = json.loads(content) assert d["log"][0]["request"]["sni"] == "foobar.com" + def test_clientcert(self): + c = pathoc.Pathoc( + "127.0.0.1", + self.d.port, + ssl = True, + clientcert = tutils.test_data.path("data/clientcert/client.pem") + ) + c.connect() + c.request("get:/p/200") + _, _, _, _, content = c.request("get:/api/log") + d = json.loads(content) + assert d["log"][0]["request"]["clientcert"]["keyinfo"] + class TestDaemon(_TestDaemon): ssl = False -- cgit v1.2.3