Re: Is Python SSL API thread-safe?

2017-01-28 Thread Grant Edwards
On 2017-01-22, Christian Heimes wrote: > OpenSSL and Python's ssl module are thread-safe. However IO is not > safe concerning reentrancy. You cannot safely share a SSLSocket > between threads without a mutex. Certain aspects of the TLS protocol > can cause interesting side

Re: Is Python SSL API thread-safe?

2017-01-22 Thread Grant Edwards
On 2017-01-22, Christian Heimes <christ...@python.org> wrote: > On 2017-01-22 21:18, Grant Edwards wrote: >> Is the Python SSL API thread-safe with respect to recv() and send()? >> >> IOW, can I have one thread doing blocking recv() calls on an SSL >> connec

Re: Is Python SSL API thread-safe?

2017-01-22 Thread Christian Heimes
On 2017-01-22 21:18, Grant Edwards wrote: > Is the Python SSL API thread-safe with respect to recv() and send()? > > IOW, can I have one thread doing blocking recv() calls on an SSL > connection object while "simultaneously" a second thread is calling > send() on th

Re: Is Python SSL API thread-safe?

2017-01-22 Thread Jon Ribbens
On 2017-01-22, Grant Edwards <grant.b.edwa...@gmail.com> wrote: > Is the Python SSL API thread-safe with respect to recv() and send()? > > IOW, can I have one thread doing blocking recv() calls on an SSL > connection object while "simultaneously" a second thread is c

Is Python SSL API thread-safe?

2017-01-22 Thread Grant Edwards
Is the Python SSL API thread-safe with respect to recv() and send()? IOW, can I have one thread doing blocking recv() calls on an SSL connection object while "simultaneously" a second thread is calling send() on that same connection object? I assumed that was allowed, but I can't fin