summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 6d27747c..3a2cafc4 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -442,6 +442,9 @@ class XMLStream(object):
else:
self.socket = ssl_socket
+ cert = self.socket.getpeercert()
+ log.debug('CERT: %s', cert)
+ self.event('ssl_cert', cert, direct=True)
try:
if not self.use_proxy:
log.debug("Connecting to %s:%s", *self.address)
@@ -675,6 +678,11 @@ class XMLStream(object):
else:
self.socket = ssl_socket
self.socket.do_handshake()
+
+ cert = self.socket.getpeercert()
+ log.debug('CERT: %s', cert)
+ self.event('ssl_cert', cert, direct=True)
+
self.set_socket(self.socket)
return True
else: