aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tcp.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-28 08:15:55 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-28 08:15:55 +1200
commita1491a6ae037b7874dd71de11f5cd43e10aa46e7 (patch)
tree2b81c0f48e0fa0ac95f9e487504a6be7d105b1b3 /test/test_tcp.py
parentb0ef9ad07ba4b805f3130237dcf9207434c33d84 (diff)
downloadmitmproxy-a1491a6ae037b7874dd71de11f5cd43e10aa46e7.tar.gz
mitmproxy-a1491a6ae037b7874dd71de11f5cd43e10aa46e7.tar.bz2
mitmproxy-a1491a6ae037b7874dd71de11f5cd43e10aa46e7.zip
Add a get_remote_cert method to tcp client.
Diffstat (limited to 'test/test_tcp.py')
-rw-r--r--test/test_tcp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_tcp.py b/test/test_tcp.py
index a2ee5e36..969daf1e 100644
--- a/test/test_tcp.py
+++ b/test/test_tcp.py
@@ -1,5 +1,5 @@
import cStringIO, threading, Queue
-from netlib import tcp
+from netlib import tcp, certutils
import tutils
class ServerThread(threading.Thread):
@@ -110,6 +110,9 @@ class TestServerSSL(ServerTestBase):
c.wfile.flush()
assert c.rfile.readline() == testval
+ def test_get_remote_cert(self):
+ assert certutils.get_remote_cert("127.0.0.1", self.port, None).digest("sha1")
+
class TestSNI(ServerTestBase):
@classmethod