00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00022
00023 #define OPGP_ERROR_SUCCESS 0 //!< No error occurred.
00024 #define OPGP_ERROR_UNRECOGNIZED_APDU_COMMAND ((DWORD)0x80301000L) //!< A APDU command can't be recognized as a valid T=0 protocol Case 1-4 ISO7816-4 APDU
00025 #define OPGP_ERROR_CARD_CRYPTOGRAM_VERIFICATION ((DWORD)0x80302000L) //!< The verification of the card cryptogram failed.
00026 #define OPGP_ERROR_COMMAND_SECURE_MESSAGING_TOO_LARGE ((DWORD)0x80303000L) //!< The command data is too large for secure messaging.
00027 #define OPGP_ERROR_COMMAND_TOO_LARGE ((DWORD)0x80303001L) //!< The command data is too large.
00028 #define OPGP_ERROR_INSUFFICIENT_BUFFER ((DWORD)0x80304000L) //!< A used buffer is too small.
00029 #define OPGP_ERROR_WRONG_TRY_LIMIT ((DWORD)0x80306000L) //!< Wrong maximum try limit.
00030 #define OPGP_ERROR_WRONG_PIN_LENGTH ((DWORD)0x80307000L) //!< Wrong PIN length.
00031 #define OPGP_ERROR_WRONG_KEY_VERSION ((DWORD)0x80308000L) //!< Wrong key version.
00032 #define OPGP_ERROR_WRONG_KEY_INDEX ((DWORD)0x80309000L) //!< Wrong key index.
00033 #define OPGP_ERROR_WRONG_KEY_TYPE ((DWORD)0x8030A000L) //!< Wrong key type.
00034 #define OPGP_ERROR_KEY_CHECK_VALUE ((DWORD)0x8030B000L) //!< Key check value reported does not match.
00035 #define OPGP_ERROR_INVALID_COMBINATION_KEY_SET_VERSION_KEY_INDEX ((DWORD)0x8030C000L) //!< The combination of key set version and key index is invalid.
00036 #define OPGP_ERROR_MORE_KEY_INFORMATION_TEMPLATES ((DWORD)0x8030D000L) //!< More key information templates are available.
00037 #define OPGP_ERROR_APPLICATION_TOO_BIG ((DWORD)0x8030E000L) //!< The application to load must be less than 32535 bytes.
00038 #define OPGP_ERROR_VALIDATION_FAILED ((DWORD)0x8030F000L) //!< A validation has failed.
00039 #define OPGP_ERROR_INVALID_FILENAME ((DWORD)0x8030F001L) //!< A file name is invalid.
00040 #define OPGP_ERROR_INVALID_PASSWORD ((DWORD)0x8030F002L) //!< A password is invalid.
00041 #define OPGP_ERROR_WRONG_EXPONENT ((DWORD)0x8030F003L) //!< The exponent must be 3 or 65537.
00042 #define OPGP_ERROR_INVALID_LOAD_FILE ((DWORD)0x8030F008L) //!< The load file has an invalid structure.
00043 #define OPGP_ERROR_CAP_UNZIP ((DWORD)0x8030F009L) //!< The CAP file cannot be unzipped.
00044 #define OPGP_ERROR_INVALID_RESPONSE_DATA ((DWORD)0x8030F00BL) //!< The response of the command was invalid.
00045 #define OPGP_ERROR_CRYPT ((DWORD)0x8030F00CL) //!< An encryption or decryption error occurred.
00046
00047
00048
00049 #define OP201_ERROR_LOAD_FILE_DAP_NULL ((DWORD)0x8030F007L) //!< The Load File DAP is <code>NULL</code>.
00050 #define OP201_ERROR_MORE_APPLICATION_DATA ((DWORD)0x80305001L) //!< More Card Manager, Executable Load File or application data is available.
00051
00052
00053
00054 #define GP211_ERROR_MORE_APPLICATION_DATA ((DWORD)0x80305000L) //!< More Issuer Security Domain, Executable Load File, Executable Load Files and Executable Modules or application data is available.
00055 #define GP211_ERROR_LOAD_FILE_DATA_BLOCK_HASH_NULL ((DWORD)0x8030F004L) //!< The Load File Data Block Hash is <code>NULL</code>.
00056 #define GP211_ERROR_INVALID_SCP ((DWORD)0x8030F005L) //!< The Secure Channel Protocol is invalid.
00057 #define GP211_ERROR_INVALID_SCP_IMPL ((DWORD)0x8030F006L) //!< The Secure Channel Protocol Implementation is invalid.
00058 #define GP211_ERROR_VALIDATION_R_MAC ((DWORD)0x8030F007L) //!< The validation of the R-MAC has failed.
00059 #define GP211_ERROR_INCONSISTENT_SCP ((DWORD)0x8030F00AL) //!< The Secure Channel Protocol passed and the one reported by the card do not match.
00060
00061
00062
00063
00064
00065
00066 #define OPGP_ISO7816_ERROR_PREFIX ((DWORD)0x80200000L) //!< Error prefix for all ISO7816 errors.
00067
00068
00069
00070
00071 #define OPGP_ISO7816_ERROR_SUCCESS (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x9000L) //!< Success. No error.
00072 #define OPGP_ISO7816_ERROR_RESPONSE_LENGTH (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6100L) //!< Response bytes available indicated the last 2 Bytes.
00073
00074
00075 #define OPGP_ISO7816_ERROR_FILE_INVALIDATED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6283L) //!< Selected file invalidated.
00076 #define OPGP_ISO7816_WARNING_CM_LOCKED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16283L) //!< Card life cycle is CM_LOCKED.
00077
00078 #define OPGP_ISO7816_ERROR_FILE_TERMINATED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6285L) //!< SELECT FILE Warning: selected file is terminated.
00079
00080
00081 #define OPGP_ISO7816_ERROR_6300 (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6300L) //!< No information given.
00082 #define OPGP_ISO7816_ERROR_HOST_CRYPTOGRAM_VERIFICATION (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16300L) //!< Authentication of host cryptogram failed.
00083
00084 #define OPGP_ISO7816_ERROR_MORE_DATA_AVAILABLE (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6310L) //!< More data available.
00085
00086
00087
00088
00089
00090 #define OPGP_ISO7816_ERROR_NOTHING_SPECIFIC (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6400L) //!< No specific diagnosis.
00091 #define OPGP_ISO7816_ERROR_MEMORY_FAILURE (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6581L) //!< Memory failure or EDC check failed.
00092
00093 #define OPGP_ISO7816_ERROR_WRONG_LENGTH (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6700L) //!< Wrong length.
00094
00095 #define OPGP_ISO7816_ERROR_CHANNEL_NOT_SUPPORTED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6881L) //!< Function not supported - Logical channel not supported/open.
00096 #define OPGP_ISO7816_ERROR_SECURE_MESSAGING_NOT_SUPPORTED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6882L) //!< Function not supported - Secure messaging not supported.
00097
00098
00099 #define OPGP_ISO7816_ERROR_CONDITIONS_NOT_SATISFIED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6985L) //!< Command not allowed - Conditions of use not satisfied.
00100 #define OPGP_ISO7816_ERROR_NOT_MULTI_SELECTABLE (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16985L) //!< The application to be selected is not multi-selectable, but its context is already active.
00101
00102 #define OPGP_ISO7816_ERROR_SECURITY_STATUS_NOT_SATISFIED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6982L) //!< Command not allowed - Security status not satisfied.
00103
00104 #define OPGP_ISO7816_ERROR_6999 (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6999L)
00105 #define OPGP_ISO7816_ERROR_SELECTION_REJECTED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16999L) //!< The application to be selected rejects selection or throws an exception.
00106
00107
00108 #define OPGP_ISO7816_ERROR_WRONG_DATA (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6A80L) //!< Wrong data / Incorrect values in command data.
00109 #define OPGP_ISO7816_ERROR_WRONG_GLOBAL_PIN_FORMAT (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16A80L) //!< Wrong format for global PIN.
00110
00111 #define OPGP_ISO7816_ERROR_FUNC_NOT_SUPPORTED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6A81L) //!< Function not supported.
00112 #define OPGP_ISO7816_ERROR_APPLET_NOT_SELECTABLE (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16A81L) //!< Card is locked or selected application was not in a selectable state.
00113
00114 #define OPGP_ISO7816_ERROR_FILE_NOT_FOUND (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6A82L) //!< File not found.
00115 #define OPGP_ISO7816_ERROR_APPLET_NOT_FOUND (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16A82L) //!< The application to be selected could not be found.
00116
00117 #define OPGP_ISO7816_ERROR_NOT_ENOUGH_MEMORY (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6A84L) //!< Not enough memory space.
00118
00119 #define OPGP_ISO7816_ERROR_INCORRECT_P1P2 (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6A86L) //!< Incorrect parameters (P1, P2).
00120 #define OPGP_ISO7816_ERROR_WRONG_PIN_TRY_LIMIT (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x16A86L) //!< Wrong parameter P2 (PIN try limit).
00121
00122 #define OPGP_ISO7816_ERROR_DATA_NOT_FOUND (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6A88L) //!< Referenced data not found.
00123
00124 #define OPGP_ISO7816_ERROR_WRONG_P1P2 (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6B00L) //!< Wrong parameters (P1, P2).
00125 #define OPGP_ISO7816_ERROR_CORRECT_LENGTH (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6C00L) //!< Correct expected length (Le) indicated by last 2 Bytes.
00126 #define OPGP_ISO7816_ERROR_INVALID_INS (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6D00L) //!< Invalid instruction byte / Command not supported or invalid.
00127 #define OPGP_ISO7816_ERROR_WRONG_CLA (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6E00L) //!< Wrong CLA byte.
00128
00129 #define OPGP_ISO7816_ERROR_ILLEGAL_PARAMETER (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x6F74L) //!< Illegal parameter.
00130
00131 #define OPGP_ISO7816_ERROR_ALGORITHM_NOT_SUPPORTED (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x9484L) //!< Algorithm not supported.
00132 #define OPGP_ISO7816_ERROR_INVALID_KEY_CHECK_VALUE (OPGP_ISO7816_ERROR_PREFIX | (DWORD)0x9485L) //!< Invalid key check value.