[openssl-users] Is CRYPTO_set_locking_callback still needed if mutexes in threads are already being used to prevent race conditions?
Avery A. Tarasov
Avery.A.Tarasov at SecurityEngineer.Pro
Sun Jan 18 23:14:24 UTC 2015
Hi, I am developing a Windows C++ application that uses OpenSSL.
The application has 2 threads created by CreateThread that perform SSL
functions such as connecting to a website over HTTPS and
I am already using a mutex to prevent race conditions, like this:
static HANDLE sslmutex=0; // global variable at top of file
*inside thread #1:*
*inside thread #2:*
All SSL related code is in the DoSsl function including
SSL_library_init(), sending/receiving data, and necessary clean up
Is it still necessary for me to use CRYPTO_set_locking_callback or is my
code already thread safe?
Any assistance greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openssl-users