From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] 
On Behalf Of Jeremy Farrell
Sent: Thursday, July 07, 2011 10:11 PM
To: openssl-users@openssl.org
Subject: RE: when to use CRYPTO_set_locking_callback and 
CRYPTO_set_dynlock_create_callback


From: Arunkumar Manickam
Sent: Thursday, July 07, 2011 8:14 AM

We are using openssl 1.0.0d in our multi threaded application.
I would like to know when to set CRYPTO_set_locking_callback and when to set 
CRYPTO_set_dynlock_* callbacks

The openssl document says that *dyn* call backs are required to improve 
performance. From openssl code, it seems only e_chill engine is using them. Pls 
correct if I am wrong here.

Is the application required to set all the callbacks or just 
CRYPTO_set_locking_callback and CRYPTO_THREADID_set_callback.

Also if *dyn* callbacks are set, does the application still need to set 
CRYPTO_set_locking_callback and CRYPTO_THREADID_set_callback.

>Why not just do them all? It's quicker and easier than spending time worrying 
>about which and whether to do, and won't do any harm.

We do see a considerable amount of performance drop after implementing 
CRYPTO_set_locking_callback and CRYPTO_THREADID_set_callback. It is removing 
random crash  though.
We haven't tried adding *dyn* callbacks.  Not sure if we should add them too. 
We are using RSA_sign API with NID_sha1 algorithm.

This is indeed good question, which can help other users too.

Reply via email to