|Applies To||RSA BSAFE Cert-J|
RSA BSAFE Crypto-J
|Issue||Cert-J/Crypto-J: How to debug/trace JSAFE_PKCS11Exception : Cryptographic hardware error|
JSAFE_PKCS11Exception : Cryptographic hardware error (or some other exception)
|Cause||JSAFE_PKCS11Exception is thrown whenever the status returned from the native C code is nonzero.|
To get more info, you could use the PKCS #11 trace library to log the calls to the PKCS #11 library. The PKCS #11 trace library can be obtained from RSA Developer Support.
1. Put the PKCS #11 trace library (e.g. p11trc.dll on Windows) in your system path (or the working directory on Windows).
2. Replace the library name in your application with the PKCS #11 trace library name, e.g.:
String libName = "p11trc.dll";
3. Rebuild your application.
4. Set these environment variables, e.g.:
set P11TRC_DRIVER=<name of the PKCS #11 library for the device>
5. Run your application. A "p11trc.txt" file should be produced. The file should show which PKCS #11 functions are being called and their return values.
|Legacy Article ID||a34483|