How do I identify the meaning of specific PCKS#11 error codes associated with the HSM?

How do I identify the meaning of specific PCKS#11 error codes associated with the HSM?

97
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 13:03 PM


Question


How do I identify the meaning of specific PCKS#11 error codes associated with the HSM?

Environment


v7.2;v8.0;8.1;v8.2;v8.5;v8.6;v9.0;v9.1;v9.2;9.3;9.5;9.6;9.7;9.8;9.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0

Answer


The HSM can generate a variety of PCKS#11 error codes, with different meanings. Depending on the code these may need to be troubleshooted by CyberArk, or by the HSM vendor. The codes along with their possible resolutions are as follows:
 

CyberArk-resolvable codes:
 

Error code 1101-PACRYPTO_RC_PKCS11_INVALID_DLL -  Lib exists but is not a PKCS#11 DLL
 

Requires assistance from HSM vendor:

Error code 1104-PACRYPTO_RC_PKCS11_TOO_MANY_SLOTS -  The PKCS#11 libs reports more slots than the hard coded maximum
Error code 1105-PACRYPTO_RC_PKCS11_NO_TOKEN -  No slot contains expected token 
Error code 1106-PACRYPTO_RC_PKCS11_MUST_SPECIFY_KEY_ID -  Must call _find_token() before _use_token() or _init_token()
Error code 1107-PACRYPTO_RC_PKCS11_TOKEN_ALREADY_INIT -  An attempt to initialize a token which is already initialized
Error code 1108-PACRYPTO_RC_PKCS11_TOKEN_CORRUPT -  Token does not contain all the required objects (only halfway initialized?)
Error code 1109-PACRYPTO_RC_PKCS11_BUFFER_TOO_SMALL
Error code 1110-PACRYPTO_RC_PKCS11_LOGIN_ERROR  -  Error during login to token (Wrong PIN? use _get_last_rv() exact reason code)
Error code 1111-PACRYPTO_RC_PKCS11_MUST_LOGIN -  Must _use_token() or _init_token() before _seal() / _unseal()
Error code 1112-PACRYPTO_RC_PKCS11_ALREADY_USED -  _use_token() or _init_token() already called. (Wrong calling order)
Error code 1113-PACRYPTO_RC_PKCS11_INVALID_INPUT_LENGTH -  Data is too long / short for the operation (seal / unseal) @I866
Error code 1114-PACRYPTO_RC_PKCS11_INTERNAL_ERROR -  Error creating semaphore for token access sync
Error code 1115-PACRYPTO_RC_PKCS11_TOKEN_ACCESS_TIMEOUT -  Timeout passed while waiting for token access
Error code 1116-PACRYPTO_RC_PKCS11_NULL_POINTER_SPECIFIED -  Null pointer was passed to function
Error code 1119-PACRYPTO_RC_PKCS11_RECOVERY_IN_PLACE -  Recovery is in place //@I3470
 

Note: These HSM codes do not have solutions either because they are not commonly seen, have never been recorded in the product before, or because they are hardware issues that require HSM vendor assistance to resolve



Additional Information


Details

Q:   

What do the PKCS 11 errors code in the log mean?

A: 

Error code 1100- PACRYPTO_RC_PKCS11_DLL_NOT_FOUND -  Error loading PKCS#11 DLL
Error code 1101-PACRYPTO_RC_PKCS11_INVALID_DLL -  Lib exists but is not a PKCS#11 DLL
Error code 1102-PACRYPTO_RC_PKCS11_LIB_INIT_FAILED -  Something wrong with PKCS#11 DLL
Error code 1103-PACRYPTO_RC_PKCS11_ERROR -  PKCS#11 lib returned error. Check with pacrypto_pkcs11_get_last_rv()
Error code 1104-PACRYPTO_RC_PKCS11_TOO_MANY_SLOTS -  The PKCS#11 libs reports more slots than the hard coded maximum
Error code 1105-PACRYPTO_RC_PKCS11_NO_TOKEN -  No slot contains expected token 
Error code 1106-PACRYPTO_RC_PKCS11_MUST_SPECIFY_KEY_ID -  Must call _find_token() before _use_token() or _init_token()
Error code 1107-PACRYPTO_RC_PKCS11_TOKEN_ALREADY_INIT -  An attempt to initialize a token which is already initialized
Error code 1108-PACRYPTO_RC_PKCS11_TOKEN_CORRUPT -  Token does not contain all the required objects (only halfway initialized?)
Error code 1109-PACRYPTO_RC_PKCS11_BUFFER_TOO_SMALL
Error code 1110-PACRYPTO_RC_PKCS11_LOGIN_ERROR  -  Error during login to token (Wrong PIN? use _get_last_rv() exact reason code)
Error code 1111-PACRYPTO_RC_PKCS11_MUST_LOGIN -  Must _use_token() or _init_token() before _seal() / _unseal()
Error code 1112-PACRYPTO_RC_PKCS11_ALREADY_USED -  _use_token() or _init_token() already called. (Wrong calling order)
Error code 1113-PACRYPTO_RC_PKCS11_INVALID_INPUT_LENGTH -  Data is too long / short for the operation (seal / unseal) @I866
Error code 1114-PACRYPTO_RC_PKCS11_INTERNAL_ERROR -  Error creating semaphore for token access sync
Error code 1115-PACRYPTO_RC_PKCS11_TOKEN_ACCESS_TIMEOUT -  Timeout passed while waiting for token access
Error code 1116-PACRYPTO_RC_PKCS11_NULL_POINTER_SPECIFIED -  Null pointer was passed to function
Error code 1117-PACRYPTO_RC_PKCS11_SEARCH_CRITERIA_NOT_DISTICNT -  Too many objects meet search cretiria
Error code 1118-PACRYPTO_RC_PKCS11_KEY_NOT_FOUND -  The key was not found   
Error code 1119-PACRYPTO_RC_PKCS11_RECOVERY_IN_PLACE -  Recovery is in place //@I3470
Error code 1120-PACRYPTO_RC_PKCS11_NO_COMPATIBLE_SLOT_FOUND -  Recovery is in place //@I3470
 Error code 1121-PACRYPTO_RC_PKCS11_INVALID_SLOT_ID -  HSMSlotIndex specified in dbparm.ini does not exist or is not suitable



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000kJ0CAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail