> > I have problems using the RSA_private_decrypt() function of the crypto > > library in parallel with *the same* (RSA *) structure. When using a > > single thread, decryption works flawlessly, when using two or more > > threads in parallel, decryption mostly fails with PKCS errors. > > > > I thought the RSA structure would be accessed read-only so that this > > should be thread-safe. > > > > There are some montgomery parameters that are cached in the RSA structure when > it is first used. You need to set the appropriate locking callbacks to avoid a > race condition in a multithreaded environment. > > > Any ideas how to solve this? Is there a function that duplicates an > > RSA structure so that I can duplicate it before using it? > > > > RSAPrivateKey_dup().
OK, thanks... Are there any examples how the locking callbacks can be set and how they could be implemented in a Linux environment? Greetings, Thomas. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]