* [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > Hello, > Quick question. > I have a multi-threaded app in which a master thread creates a RSA key-pair > and subsequently spawns a number of worker threads. > I am assuming that routines like RSA_public_encrypt() are reentrant because > an RSA * pointer is passed (please correct me if this assumption is wrong). > Multiple threads could potentially be in one of the RSA_...en/decrypt() > routine at any point in time. > My question is: can the worker threads all use the RSA * created by the > master thread or do they need to have a private copy of it? > Any help greatly appreciated.
Use of RSA objects are thread-safe provided you implement locking callbacks for use by OpenSSL; http://www.openssl.org/docs/crypto/threads.html# If OpenSSL was configured to not support threading then all bets are off - this is covered in the "NOTE" section of the man page I've referred you to. Cheers, Geoff -- Geoff Thorpe [EMAIL PROTECTED] http://www.openssl.org/ ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
