In the hw_ncipher.c module in crypto/engine there are mutex callbacks
that return 1 on success and 0 on failure (in openssl-engine-0.9.6b).
This is the wrong way around. They should return 0 on success and 1 on
failure (see vendor_defns/hwcryptohook.h). 

Symptoms: 

1) I got concurrency problems in the nCipher code when running 20 odd
threads doing signing/verification.
2) I added dynamic lock callbacks which caused the nCipher engine to
fail to initialise (messages was mutex_init failed).

Debugging I found that mutex_init didn't fail - it was succesfull, it
just returned the wrong values.

Is this correct? 

Andy S.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to