Hello,
> It was seen that the CRYPTO_thread_id() uses getpid() which was
> returning same value for all threads. Instead of getpid() I used
> pthread_self() which appears to have solved the problem
> that I had reported in this mail. I am not seeing the problem
> re-occur. 
> Another users post referrring to the same case can be found at
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg21031.html.
> 
> I use the linux kernel 2.6
> 
> Is using pthread_self() OK. Or is there any better way which would
> yeild correct thread IDs in 
> CRYPTO_thread_id()?
> 
CRYPTO_thread_id uses getpid() if no other ID functions was set.
Some example of initializing  crypto locking you may find at:
        
http://www.nabble.com/When-to-use-CRYPTO_set_locking_callback%28%29-and-CRYPTO_set_id_callback%28%29--tf2121027.html#a6333104
In this example locking callback function is defined (using pthread_self())
and set at startup.

Best regards,
-- 
Marek Marcola <[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