Expire management challenges on unrelated commands

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-08-14 23:51:54 +02:00
parent 4b5de68912
commit 41704e54c1
+3
View File
@@ -1636,6 +1636,9 @@ static const cmd_t cmds[] = {
int piv_process_apdu(void) {
sm_unwrap();
if (INS(apdu) != INS_AUTHENTICATE && INS(apdu) != INS_SELECT && !(INS(apdu) == INS_GET_METADATA && P2(apdu) == EF_PIV_KEY_CARDMGM)) {
clear_mgm_challenge();
}
if (apdu.nc == 1) {
return SW_INCORRECT_PARAMS();
}