Error Codes for CryptoSys PKI


Here is a list of all the error codes that can be returned by the functions and methods in the CryptoSys PKI Toolkit.

0 = OK, success, no error (SUCCESS_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 in wrong format (BAD_FORMAT_ERROR)
8 = Invalid data (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)
16 = Item has expired or is not yet valid (EXPIRED_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)
25 = Certificate issuer error (ISSUER_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)

To find the error message corresponding to a numerical error code use the PKI_ErrorLookup function or the General.ErrorLookup Method.

This page last updated 12 August 2010