We use OpenSSL in a highly multi-threaded application and don't have problems. There are some locking callbacks that you should be using. Look up these:
CRYPTO_set_id_callback(); CRYPTO_set_locking_callback(); CRYPTO_set_dynlock_create_callback(); CRYPTO_set_dynlock_lock_callback(); CRYPTO_set_dynlock_destroy_callback(); Dave. -----Original Message----- From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Chris Dodd Sent: Thursday, May 05, 2011 1:01 PM To: openssl-users@openssl.org Subject: OpenSSL and multithreaded programs Is the OpenSSL library supposed to be at all reentrant? I've had odd problems (intermittent errors) when trying to use OpenSSL in a multithreaded program (multiple threads each dealing with independent SSL connections), and have apparently solved them by creating a single global mutex and wrapping a mutex acquire around every call into the library. Is this kind of locking expected to be needed? Chris Dodd cd...@csl.sri.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org