[Python-Dev] OpenSSL thread safety when reading files?

Bill Janssen janssen at parc.com
Sat Sep 8 00:56:08 CEST 2007

> My analysis is that we need to add lock and unlock functions to the
> OpenSSL initialization code we currently use

Yep, this seems to fix the problem.  I'm now able to re-enable
Py_BEGIN_ALLOW_THREADS / Py_END_ALLOW_THREADS, and still get a clean

(gdb) run
Starting program: /local/python/trunk/src/python.exe ./Lib/test/regrtest.py -R :4: -u all test_ssl
/local/python/trunk/src/Lib/test/test_ssl.py:247: DeprecationWarning: socket.ssl() is deprecated.  Use ssl.sslsocket() instead.
  ssl_sock = socket.ssl(s)
beginning 9 repetitions
1 test OK.
[30009 refs]

Program exited normally.


More information about the Python-Dev mailing list