mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Fix return pin blocked sw code.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
f9ffd39661
commit
c9b32ab5d0
2 changed files with 2 additions and 3 deletions
|
|
@ -1046,7 +1046,7 @@ static int cmd_delete_file() {
|
|||
if (apdu.cmd_apdu_data_len == 0) {
|
||||
ef = currentEF;
|
||||
if (!(ef = search_dynamic_file(ef->fid)))
|
||||
return SW_FILE_INVALID();
|
||||
return SW_FILE_NOT_FOUND();
|
||||
}
|
||||
else {
|
||||
uint16_t fid = (apdu.cmd_apdu_data[0] << 8) | apdu.cmd_apdu_data[1];
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ 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_PIN_BLOCKED() set_res_sw (0x63, 0x00)
|
||||
#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)
|
||||
|
|
@ -34,7 +33,7 @@ extern const uint8_t sc_hsm_aid[];
|
|||
#define SW_LOGICAL_CHANNEL_NOT_SUPPORTED() set_res_sw (0x68, 0x81)
|
||||
#define SW_SECURE_MESSAGING_NOT_SUPPORTED() set_res_sw (0x68, 0x82)
|
||||
#define SW_SECURITY_STATUS_NOT_SATISFIED() set_res_sw (0x69, 0x82)
|
||||
#define SW_FILE_INVALID() set_res_sw (0x69, 0x83)
|
||||
#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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue