Report undefined references as not found

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-08-14 21:34:55 +02:00
parent e674ab1028
commit 1b396be439
+2 -2
View File
@@ -1219,7 +1219,7 @@ static int cmd_move_key(void) {
static int cmd_piv_change_pin(void) {
uint8_t pin_ref = P2(apdu);
if (P1(apdu) != 0x0 || (pin_ref != 0x80 && pin_ref != 0x81)) {
return SW_INCORRECT_P1P2();
return SW_REFERENCE_NOT_FOUND();
}
file_t *ef = file_search_by_fid(pin_ref == 0x80 ? EF_PIV_PIN : EF_PIV_PUK, NULL, SPECIFY_ANY);
if (!ef) {
@@ -1242,7 +1242,7 @@ static int cmd_piv_change_pin(void) {
static int cmd_piv_reset_retry(void) {
if (P1(apdu) != 0x0 || P2(apdu) != 0x80) {
return SW_INCORRECT_P1P2();
return SW_REFERENCE_NOT_FOUND();
}
file_t *ef = file_search_by_fid(EF_PIV_PUK, NULL, SPECIFY_ANY);
if (!ef) {