PIN remaining tries only returned when user is not logged in. If so, it returns always OK.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-03-31 13:17:16 +02:00
parent 7cf166d615
commit 86e38419ac

View File

@@ -439,6 +439,8 @@ static int cmd_verify() {
}
if (file_read_uint8(file_retries_pin1->data+2) == 0)
return SW_PIN_BLOCKED();
if (isUserAuthenticated && has_session_pin)
return SW_OK();
return set_res_sw(0x63, 0xc0 | file_read_uint8(file_retries_pin1->data+2));
}
else if (p2 == 0x88) { //SOPin