The OpenSSL FAQ states that it can be used in threaded applications:
1. Is OpenSSL thread-safe?
Provided an application sets up the thread callback functions, the answer is yes.
This callback functions refers to a global SSL-lock, thus if you have 2 ssl connections running these will both use this global lock.
However the FAQ continues:
There are limitations; for example, an SSL connection cannot be used concurrently by multiple threads. This is true for most OpenSSL objects.
This indicates that an additional mutex is needed for every SSL-connection. Is this correct? Or do I not need the additional mutex for every SSL-connection?