0 = OK, success, no error 1 = Cannot open input file (OPEN_ERROR) 2 = Cannot create output file (CREATE_ERROR) 3 = File read error (READ_ERROR) 4 = File write error (WRITE_ERROR) 5 = Not enough memory (MEMORY_ERROR) 6 = Parameter is wrong or missing (BAD_PARAM_ERROR) 7 = Data is in wrong format (BAD_FORMAT_ERROR) 8 = The data is invalid (INVALID_DATA_ERROR) 9 = Unexpected end of file found (EOF_ERROR) 11 = Value out of range (OUT_OF_RANGE_ERROR) 12 = Duplicate data (DUP_ERROR) 13 = Misc file IO error (IO_ERROR) 14 = Unexpected NULL value (NULL_ERROR) 15 = Decryption error (DECRYPT_ERROR) 17 = Invalid option (BAD_FLAG_ERROR) 18 = Failed to wipe data (WIPE_ERROR) 19 = This algorithm or version not supported (NOT_SUPPORTED_ERROR) 20 = No data found to process (NO_DATA_ERROR) 21 = No match found (NO_MATCH_ERROR) 22 = Signature is invalid or missing (SIGNATURE_ERROR) 23 = Failed a test e.g. known answer test (TEST_FAILED_ERROR) 24 = Key generation failed (KEYGEN_FAILED_ERROR) 26 = Data not a valid length (BAD_LENGTH_ERROR) 27 = Invalid XML format (BAD_XML_ERROR) 28 = Message too long (MSG_TOO_LONG_ERROR) 29 = Not a valid query (BAD_QUERY_ERROR) 30 = Not enough room in output buffer (SHORT_BUF_ERROR) 33 = Invalid key length (BAD_KEY_LEN_ERROR) 34 = Invalid block length (BAD_BLK_LEN_ERROR) 35 = Invalid mode (BAD_MODE_ERROR) 36 = Invalid key (BAD_KEY_ERROR) 37 = Invalid initialization vector (BAD_IV_ERROR) 201 = PRNG: Cannot open input file (PRNG_ERR_FILE_OPEN) 202 = PRNG: Cannot create output file (PRNG_ERR_FILE_CREATE) 203 = PRNG: File read error (PRNG_ERR_FILE_READ) 204 = PRNG: File write error (PRNG_ERR_FILE_WRITE) 205 = PRNG: File locking error (PRNG_ERR_FILE_LOCK) 210 = PRNG: Uninstantiation failed (PRNG_ERR_UNINST) 211 = PRNG: Requested length is too large (PRNG_ERR_TOOBIG) 212 = PRNG: Function failed (PRNG_ERR_FAILURE) 213 = PRNG: Invalid input parameter (PRNG_ERR_BADPARAM) 214 = PRNG: Function is not available (PRNG_ERR_NOTAVAIL) 299 = PRNG: Catastrophic failure (PRNG_ERR_CATASTROPHIC) 9999 = Miscellaneous error (MISC_ERROR)
If an error occurs the function will return one of the above error codes to indicate the general nature of the problem. Functions that normally return a positive value to indicate success will return these error codes as negative numbers.
More than one error may occur during a call to a function.
The code returned by a function will reflect the last error that occurred in the chain.
Use the PKI_ErrorCode function to find the code of the first error that occurred.
More details on the error can usually be found by using the
PKI_LastError
function which contains a description of the error or errors that have occurred. Not all errors set this
description.
Use the PKI_ErrorLookup function to get the corresponding
error message for a given error code.
Failure of an automatic Self-Test routine will cause the module to exit after writing an
error message to the event log and an optional error log file. However, failure of the on-demand
PKI_PowerUpTests function will just return
TEST_FAILED_ERROR (error code 23).