From 3f9aad53ab9b567ddc89848c54234d667a846db8 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 28 Jun 2012 10:59:03 +1200 Subject: [PATCH] Return a certutils.SSLCert object from get_remote_cert. --- netlib/tcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlib/tcp.py b/netlib/tcp.py index a265ef7ad..b3fc22125 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -68,7 +68,7 @@ class TCPClient: self.connection.do_handshake() except SSL.Error, v: raise NetLibError("SSL handshake error: %s"%str(v)) - self.cert = self.connection.get_peer_certificate() + self.cert = certutils.SSLCert(self.connection.get_peer_certificate()) self.rfile = FileLike(self.connection) self.wfile = FileLike(self.connection) self.ssl_established = True