Commit 8b06aa11 authored by Sam Whited's avatar Sam Whited

Fix fetching the SSL socket for Python 3.4 and 3.5

parent 3c7236fe
......@@ -506,7 +506,9 @@ class XMLStream(asyncio.BaseProtocol):
self.event('ssl_invalid_chain', e)
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",
pem_cert = ssl.DER_cert_to_PEM_cert(der_cert)
self.event('ssl_cert', pem_cert)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment