mirror of
https://github.com/polhenarejos/pico-openpgp.git
synced 2026-08-31 09:03:28 +01:00
Expire management challenges on unrelated commands
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user