2016-02-29 14:10 GMT+01:00 Andrew Svetlov <andrew.svet...@gmail.com>: > IIRC latest asyncio uses BIO (not socket wrapper) for SSL processing, > so it does never block.
What about Python 3.4 which doesn't support BIO? Do you think that the SSL/TLS handshake can block? We use it in asynchronous mode, no? _SelectorSslTransport: ... sslsock = sslcontext.wrap_socket(rawsock, do_handshake_on_connect=False, ...) ... The socket is in non-blocking mode, no? In the C code, _ssl__SSLSocket_do_handshake_impl(): nonblocking = (sock->sock_timeout >= 0); BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking); BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); ... ret = SSL_do_handshake(self->ssl); ... } else if (sockstate == SOCKET_IS_NONBLOCKING) { break; Victor