This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Elizacat
Recipients Elizacat, asvetlov, gc, gvanrossum, pitrou, vstinner, yselivanov
Date 2015-04-28.18:01:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It seems pretty simple to just make a function that returns a new transport, something like "transport = yield from loop.ssl_wrap_transport(transport)". I'm not sure how to handle plaintext data left on the wire, though, unless that's not really a consideration (given most (all?) real-world protocols can (and usually do) wait for the SSL handshake before sending more data when STARTTLS has been requested).

For the higher-level API, I'm thinking "reader, writer = asyncio.ssl_wrap(reader, writer)" maybe? You can't have half-closed SSL connections, so you would have to pass them both in. 

As for replacing the protocol but keeping the transport, what would be the semantics of that? I can't really think of how to do that one. I do know SMTP clears all state, but some protocols might not (IRC is a key example - this isn't usually a problem since you are supposed to negotiate it early on before you log onto the server), so this shouldn't be mandatory.
Date User Action Args
2015-04-28 18:01:28Elizacatsetrecipients: + Elizacat, gvanrossum, pitrou, vstinner, asvetlov, yselivanov, gc
2015-04-28 18:01:28Elizacatsetmessageid: <>
2015-04-28 18:01:28Elizacatlinkissue23749 messages
2015-04-28 18:01:27Elizacatcreate