On Sun, Sep 04, 2005, Jrgen Hovland wrote:

> Hi,
> 
> I have a question about the use of openssl, EVP_CIPHER_CTXs, in a
> multithreaded environment.
> I have N threads calling a function that contains an EVP_CIPHER_CTX,
> ctx_init, EVP_CipherUpdate/Final and then Cleanup.
> The CTX is only used by that same thread calling the function.
> 

I'm not sure what you mean by that description. An EVP_CIPHER_CTX by its very
nature should not be shared between threads.

> Must all N threads call CRYPTO_set_locking_callback before use? 
> If so, can/should the callback function point to the same lock/mutexes for
> all threads or should they have their own lock per thread?
> 

It should be set once before starting any threads.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to