Hi,

I think you needn't lock the SSL_connect/SSL_accept. It's too low efficient.


You just have to set the lock callback using:

    CRYPTO_set_locking_callback(pthread_lock_handler);

    CRYPTO_set_id_callback(id_handler); 

It works fine in linux. But it does not in WinXP.  I was  puzzled with it
too.

Regards,
Kurt.

>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Kingston Smiler
>Sent: Wednesday, September 05, 2007 3:53 PM
>To: openssl-users@openssl.org
>Subject: Reagrding Thread safety in OpenSSL
>
>Hi,
>   I'm having a small query regarding the thread safety of the 
>OpenSSL library.
> OpenSSL provide some set of Static Locking Callbacks and 
>Dynamic locking callbacks to ensure the thread safety of the 
>OpenSSL data structures. But if the application using the 
>OpenSSL, implements its own locking mechanism while accessing 
>the SSL calls (SSL_Connect,SSL_Read e.t.c) then is it 
>necessary to implment those callbacks also?
>
> i.e
>
>code like this
>
>Thread1
>{
>
>lock (a)
>SSL_Connect(pSSL)
>unlock(a)
>
>}
>
>Thread2
>{
>lock (a);
>SSL_accept(pSSL);
>unlok(a);
>}
>______________________________________________________________________
>OpenSSL Project                                 http://www.openssl.org
>User Support Mailing List                    openssl-users@openssl.org
>Automated List Manager                           [EMAIL PROTECTED]
>


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

Reply via email to