[issue23749] asyncio missing wrap_socket

Giovanni Cannata report at bugs.python.org
Mon Mar 23 14:59:59 CET 2015


New submission from Giovanni Cannata:

It's not possible to wrap a socket in tls. The StreamWriter object should have an option to start a tls negotiation using the SSLContext of the server.

This is needed for protocols the have a "start_tls" feature, for example the ldap protocol.

In a non async program it's very easy: 
   wrapped_socket = ssl_context.wrap_socket(connection.socket, server_side=True, do_handshake_on_connect=True)

there should be something similar in the StreamWriter interface:
   yield from writer.wrap_socket()

Bye,
Giovanni

----------
components: asyncio
messages: 239021
nosy: gc, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio missing wrap_socket
type: enhancement
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23749>
_______________________________________


More information about the Python-bugs-list mailing list