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

2016-06-27 Thread Nikolaus Rath
Hello, IIAC, when using the standard library's ssl module, the following can happen (distilled from http://bugs.python.org/issue22499): 1. User calls SSLSocket.send(something) 2. SSLSocket.send raises SSLWantRead (or SSLWantWrite) 3. User calls select() to wait for Read (or write) readyness of th

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

2016-06-27 Thread Vladimir Didenko
2016-06-28 2:07 GMT+03:00 Nikolaus Rath: > Hello, > > Can someone tell me how pyOpenSSL supports non-blocking socket? Yes, it does. > Does it > also require the caller to maintain struct iostate, or does it allow to > work with just SSLWantRead/Write and select()? > iostate is not required. J

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

2016-06-27 Thread Vladimir Didenko
2016-06-28 2:07 GMT+03:00 Nikolaus Rath : > 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 beca

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

2016-06-27 Thread Glyph
> On Jun 27, 2016, at 22:23, Vladimir Didenko > wrote: > > 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!). The better way to use pyOpenSSL (and more recent stdlib ssl modules) is to use Memory B