From a1491a6ae037b7874dd71de11f5cd43e10aa46e7 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 28 Jun 2012 08:15:55 +1200 Subject: Add a get_remote_cert method to tcp client. --- test/test_tcp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/test_tcp.py') 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 -- cgit v1.2.3