The OpenSSL library may be thread safe, but you must ensure that you commit the primitives yourself. From the OpenSSL FAQs :
OpenSSL, CRYPTO_set_locking_callback() CRYPTO_set_id_callback() OpenSSL 0.9.8 [abc...]. 1.0.0, CRYPTO_set_id_callback() API CRYPTO_THREADID_set_callback() . threads(3) manpage.
SSL_free(), SSL_read(), . , , API. SSL_read() SSL_write() . SSL_CTX *, , , SSL_free(), , , , OpenSSL - , SSL_CTX * - , .
, , . BIO, .
. , . , , SSL_free().
, , , , , . OpenSSL , BSD-. , "" OpenSSL , OpenSSL . , , (, ). , OpenSSL , , , "". , , , , , OpenSSL.