Merge remote-tracking branch 'samwhited/sslsocket_workaround'
This commit is contained in:
commit
d7ffcb54eb
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue