Richard Dykiel wrote:
>
> I've had no answers to that question so far, so I'm re-posting it, hoping
> that someone out there could provide me with a hint...
> thanks
>
> > -----Original Message-----
> > From: Richard Dykiel [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 13, 2000 11:36 AM
> > To: [EMAIL PROTECTED] (E-mail)
> > Subject: multithreaded crypto functions
> >
> >
> > Hi,
> >
> > My application calls directly the following functions in OpenSSL:
> >
> > * EVP_CipherInit/Update/Final, etc..
> > * PEM_read_PrivateKey, PEM_read_X509, etc...
> >
> > In a multithreaded context, do these calls need to be
> > encapsulated by calls
> > to CRYPTO_lock? I happen to have transient failures:
> >
> > * EVP_DecryptFinal: Bad Decrypt
> > * PEM_do_header: Bad Decrypt
> >
What do you mean by "in a multithreaded context"?
If each thread has its own EVP_CIPHER_CTX structure there are no known
issues which could cause problems, that doesn't mean there aren't any
though!
If however you are sharing an EVP_CIPHER_CTX between threads then that
may well cause problems, but such a thing isn't likely to be thread safe
unless you carefully synchronise operations.
Hmmm PEM_do_header....
Nothing obvious in there, unless you are using the old (broken)
technique of passing pass phrases via global variables instead of the
extra parameter.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]