Hi Sean, What you are doing should work fine. Couple of caveats - to work well with OpenSSL in a multithreaded mode, you need to set up mutexes for OpenSSL to work. - Most of my experience is with SSLeay 0.9.0b, so I don't know if anything major has changed since then, with respect to threading. Regards, Ambarish > -----Original Message----- > From: Sean O'Dell [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 14, 1999 12:00 PM > To: [EMAIL PROTECTED] > Subject: Is OpenSSL thread-safe? > > > Thread question: > > I have a threaded listen server that works well without the > OpenSSL library. > I've managed to convert it to use OpenSSL, but I'm curious what the > threading issues are. In particular: > > I'm using a single CTX for each SSL. I perform the accept() > in the main > thread and then spawn a new thread. In the new thread, I > create a new SSL > with the one common CTX, then perform SSL_accept, etc., including > SSL_shutdown; all in the new thread. > > Does that sound OK? Do I need to wrap anything in mutexes? > > -Sean > > --- > Celtech Software Making advanced software easy and > fun to use > www.celsoft.com [EMAIL PROTECTED] > 818-347-2875 > > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > Development Mailing List [EMAIL PROTECTED] > Automated List Manager [EMAIL PROTECTED] > ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]