mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-05-03 21:36:25 +00:00
Adding SOPIN verification.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
0916489388
commit
c6d87756ab
1 changed files with 6 additions and 0 deletions
|
|
@ -479,6 +479,12 @@ static int cmd_verify() {
|
|||
return set_res_sw(0x63, 0xc0 | file_read_uint8(file_retries_pin1->data+2));
|
||||
}
|
||||
else if (p2 == 0x88) { //SOPin
|
||||
if (apdu.cmd_apdu_data_len > 0) {
|
||||
return check_pin(file_sopin, apdu.cmd_apdu_data, apdu.cmd_apdu_data_len);
|
||||
}
|
||||
if (file_read_uint8(file_retries_sopin->data+2) == 0)
|
||||
return SW_PIN_BLOCKED();
|
||||
return set_res_sw(0x63, 0xc0 | file_read_uint8(file_retries_sopin->data+2));
|
||||
}
|
||||
return SW_REFERENCE_NOT_FOUND();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue