If you share the return of the SSL_CTX_new call, then you need to initialize the mutexes in libcrypto, see CRYPTO_set_locking_callback for this.
The second option is to have one SSL_CTX per thread, as mentionned by Stephen.


Regards,
--
Frédéric Giudicelli
http://www.newpki.org

Alberto Alonso wrote:

On Fri, 2004-02-20 at 16:34, Dr. Stephen Henson wrote:


Looks like a race condition of some sort.

Well first thing I'd suggest is using the latest 0.9.7 snapshot and seeing if
you still have the problem.


I will try that.

Also compile OpenSSL with debugging symbols so the precise location of the
crash (if it stil happens) can be determined.


I think it already was, but the stack corruption keeps it
from giving a good error message.

There should be no problems using the same SSL_CTX among multiple threads. If
however you mean an EVP_CIPHER_CTX each thread should have its own because
state information is stored in there.


I'm confused, what is the EVP_CIPHER_CTX?

I do calls to OpenSSL_add_all_algorithms,SSL_load_error_strings,
TLSv1_client_method

And then share the return of the SSL_CTX_new call.

Is that SSL_CTX or EVP_CIPHER_CTX?

Thanks,

Alberto



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to