mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Adding more SW codes.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
ce4d0bf102
commit
dec3d54ddd
1 changed files with 27 additions and 0 deletions
|
|
@ -26,29 +26,56 @@ extern const uint8_t sc_hsm_aid[];
|
|||
|
||||
#define SW_BYTES_REMAINING_00() set_res_sw (0x61, 0x00)
|
||||
#define SW_WARNING_STATE_UNCHANGED() set_res_sw (0x62, 0x00)
|
||||
#define SW_WARNING_CORRUPTED() set_res_sw (0x62, 0x81)
|
||||
#define SW_WARNING_EOF() set_res_sw (0x62, 0x82)
|
||||
#define SW_WARNING_EF_DEACTIVATED() set_res_sw (0x62, 0x83)
|
||||
#define SW_WARNING_WRONG_FCI() set_res_sw (0x62, 0x84)
|
||||
#define SW_WARNING_EF_TERMINATED() set_res_sw (0x62, 0x85)
|
||||
|
||||
#define SW_WARNING_NOINFO() set_res_sw (0x63, 0x00)
|
||||
#define SW_WARNING_FILLUP() set_res_sw (0x63, 0x81)
|
||||
|
||||
#define SW_EXEC_ERROR() set_res_sw (0x64, 0x00)
|
||||
|
||||
#define SW_MEMORY_FAILURE() set_res_sw (0x65, 0x81)
|
||||
|
||||
#define SW_WRONG_LENGTH() set_res_sw (0x67, 0x00)
|
||||
#define SW_WRONG_DATA() set_res_sw (0x67, 0x00)
|
||||
|
||||
#define SW_LOGICAL_CHANNEL_NOT_SUPPORTED() set_res_sw (0x68, 0x81)
|
||||
#define SW_SECURE_MESSAGING_NOT_SUPPORTED() set_res_sw (0x68, 0x82)
|
||||
|
||||
#define SW_COMMAND_INCOMPATIBLE() set_res_sw (0x69, 0x81)
|
||||
#define SW_SECURITY_STATUS_NOT_SATISFIED() set_res_sw (0x69, 0x82)
|
||||
#define SW_PIN_BLOCKED() set_res_sw (0x69, 0x83)
|
||||
#define SW_DATA_INVALID() set_res_sw (0x69, 0x84)
|
||||
#define SW_CONDITIONS_NOT_SATISFIED() set_res_sw (0x69, 0x85)
|
||||
#define SW_COMMAND_NOT_ALLOWED() set_res_sw (0x69, 0x86)
|
||||
#define SW_SECURE_MESSAGING_MISSING_DO() set_res_sw (0x69, 0x87)
|
||||
#define SW_SECURE_MESSAGING_INCORRECT_DO() set_res_sw (0x69, 0x88)
|
||||
#define SW_APPLET_SELECT_FAILED() set_res_sw (0x69, 0x99)
|
||||
|
||||
#define SW_INCORRECT_PARAMS() set_res_sw (0x6A, 0x80)
|
||||
#define SW_FUNC_NOT_SUPPORTED() set_res_sw (0x6A, 0x81)
|
||||
#define SW_FILE_NOT_FOUND() set_res_sw (0x6A, 0x82)
|
||||
#define SW_RECORD_NOT_FOUND() set_res_sw (0x6A, 0x83)
|
||||
#define SW_FILE_FULL() set_res_sw (0x6A, 0x84)
|
||||
#define SW_WRONG_NE() set_res_sw (0x6A, 0x85)
|
||||
#define SW_INCORRECT_P1P2() set_res_sw (0x6A, 0x86)
|
||||
#define SW_WRONG_NC() set_res_sw (0x6A, 0x87)
|
||||
#define SW_REFERENCE_NOT_FOUND() set_res_sw (0x6A, 0x88)
|
||||
#define SW_FILE_EXISTS() set_res_sw (0x6A, 0x89)
|
||||
|
||||
#define SW_WRONG_P1P2() set_res_sw (0x6B, 0x00)
|
||||
|
||||
#define SW_CORRECT_LENGTH_00() set_res_sw (0x6C, 0x00)
|
||||
|
||||
#define SW_INS_NOT_SUPPORTED() set_res_sw (0x6D, 0x00)
|
||||
|
||||
#define SW_CLA_NOT_SUPPORTED() set_res_sw (0x6E, 0x00)
|
||||
|
||||
#define SW_UNKNOWN() set_res_sw (0x6F, 0x00)
|
||||
|
||||
#define SW_OK() set_res_sw (0x90, 0x00)
|
||||
|
||||
#define HSM_OK 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue