summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-05-16 17:24:46 +0200
committerlouiz’ <louiz@louiz.org>2017-05-16 17:24:46 +0200
commitd7ffcb54eb324132e12ca92ac80cb664ce88558a (patch)
tree94e350730d34707998bb76c96fcc8ae8b4867bd9
parentc33749e57adb5cffdb5cc056cbc1f214191923bf (diff)
parent8b06aa1146faa083226c69eb0aa383ef199b14a4 (diff)
downloadslixmpp-d7ffcb54eb324132e12ca92ac80cb664ce88558a.tar.gz
slixmpp-d7ffcb54eb324132e12ca92ac80cb664ce88558a.tar.bz2
slixmpp-d7ffcb54eb324132e12ca92ac80cb664ce88558a.tar.xz
slixmpp-d7ffcb54eb324132e12ca92ac80cb664ce88558a.zip
Merge remote-tracking branch 'samwhited/sslsocket_workaround'
-rw-r--r--slixmpp/xmlstream/xmlstream.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index db494ee2..704a34f1 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -525,7 +525,9 @@ class XMLStream(asyncio.BaseProtocol):
else:
self.event('ssl_invalid_chain', e)
else:
- der_cert = transp.get_extra_info("socket").getpeercert(True)
+ # Workaround for a regression in 3.4 where ssl_object was not set.
+ der_cert = transp.get_extra_info("ssl_object",
+ default=transp.get_extra_info("socket")).getpeercert(True)
pem_cert = ssl.DER_cert_to_PEM_cert(der_cert)
self.event('ssl_cert', pem_cert)