Excuse my opinion... But I think the structures should be thread safe as the functions In my case as you can read in my previous reply I'm loading a dll multiple times and something similar is happening. If I deploy more that 3 concurrent threads (each one call the dll) the system crash.
Regards, Ludwig O'Hallorans Software Developer Phone 1.786.454.8472 Fax 1.786.363.1784 email: [email protected] www.magaya.com This email message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify the sender via returned email. Please note that any views or opinions expressed in this email are solely those of the author and do not necessarily represent those of the company. Although Magaya Corporation operates anti-virus programs, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Please consider the environment before printing this email. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dr. Stephen Henson Sent: Thursday, August 15, 2013 12:15 PM To: [email protected] Subject: Re: Thread safe callbacks never actually called On Tue, Aug 13, 2013, Joshua Miller wrote: > Hello OpenSSL, > > I am attempting to encrypt a data stream with multiple threads calling > EVP_CipherUpdate. I have set the thread_id and call_back functions as > defined by the API. These functions are never being called, however. > I've used CRYPTO_get_locking_callback() to verify that my function has > been set correctly. > > Everything works correctly when the threads are serialized, but not > when created concurrently. The main goal is to run EVP_CipherUpdate() > on a large amount of data on many threads. > > It seems to me that this should be working, can you tell me what I > have done wrong? > It depends on what you are trying to do. If you've several threads using the same EVP_CIPHER_CTX that wont work in general as partial blocks get saved in internal buffers and one thread could overwrite a partial block from another. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [email protected] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [email protected]
