From: Dr. Stephen Henson
Sent: Sunday, May 13, 2012 5:53 PM

Yes because some structures need to be locked internally. An example is the
error queue.

I draw a conclusion: in multi-threaded application using of locking_function and threadid_func is mandatory. Ok.

Currently dynamical locks aren't used for much. The only example I can
immediately think of is the CHIL ENGINE.
At some point dynamic locks might be used more generally. The reason they
could increase performance is that currently locks are global and related to
structures.

I don't understand precisely, Steve. All locking is done by OpenSSL itself, we only set platform-specific callback functions such as locking_function, CRYPTO_set_dynlock_lock_callback. We don't speak about locking programmer's objects but about internal objects of OpenSSL that must be done by OpenSSL itself not by programmer. If you also say that "dynamical locks aren't used for much" I really don't understand can we use safely only dynamic locks in multi-threaded applications instead of locking_function and threadid_func or no? Or if we want to use dynamic locks we must set callback functions for "static" and dynamic locks both and OpenSSL already choose what callback it want to use in concrete case? How OpenSSL works here?

So if you need to perform locking on an X509 structure you lock
*all* X509 structures while this is going on. It would be more efficient if
only the single affected X509 structure was locked.

Yes, it would be more efficient if only the single affected X509 structure was locked, I understood now about performance.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager majord...@openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to