[Cryptography-dev] pyOpenSSL: non-blocking socket support

Vladimir Didenko vladimir.didenko at gmail.com
Tue Jun 28 01:23:30 EDT 2016


2016-06-28 2:07 GMT+03:00 Nikolaus Rath <Nikolaus at rath.org>:

> Hello,
>
> IIAC, when using the standard library's ssl module, the following can
> happen (distilled from http://bugs.python.org/issue22499):
>

I read this issue and it looks like I misunderstood you question.


> If I understand correctly, this is because the ssl module does not
> actually implement the 'struct iostate' state machinery required by
> OpenSSL and instead just blindly raises SSLWantRead/SSLWantWrite.
>

And it shouldn't implement it. It is task for user to handle IO state.


> Can someone tell me how pyOpenSSL supports non-blocking socket? Does it
> also require the caller to maintain struct iostate, or does it allow to
> work with just SSLWantRead/Write and select()?
>

Doesn't differ from standard ssl module.

Resume: you can use nonblocking ssl socket with standard ssl module and
PyOpenSSL. Though it requires some work from you (but it is not hard!).

-- 
Regards,
Vladimir.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20160628/82495572/attachment.html>


More information about the Cryptography-dev mailing list