Set XMLStream.socket after the SSL connection is made too

Fixes SCRAM-SHA-1-PLUS.
This commit is contained in:
mathieui 2015-02-28 20:32:33 +01:00
parent 93ce318259
commit 8da269de88
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -504,6 +504,7 @@ class XMLStream(asyncio.BaseProtocol):
der_cert = transp.get_extra_info("socket").getpeercert(True)
pem_cert = ssl.DER_cert_to_PEM_cert(der_cert)
self.event('ssl_cert', pem_cert)
self.socket = self.transport.get_extra_info("socket")
asyncio.async(ssl_coro())