> 1. Is OpenSSL thread-safe? > Yes (with limitations: an SSL connection may not concurrently be used by > multiple threads)
This means exactly what it says. A single SSL connection may not be used concurrently by multiple threads. This means it is illegal for one thread to do a 'write' on the connection at the same time another thread might be doing, say, a 'read'. You can share an SSL connection object among threads, but you must protect it yourself with a mutex or similar lock. This is a semantic difference between SSL connections and normal TCP connections. For example, with TCP, you call 'shutdown' in one thread, 'read' in another, and 'write' in a third all at the same time and you will get sensible results. This is, however, the usual rule for user-space objects. For example, even if you have a plain old integer, you cannot write to it in one thread and read from it another and get guaranteed results. (At least, not without some special knowledge about your platform.) DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]