This commit is contained in:
iceman1001 2025-02-23 21:16:34 +01:00
commit 66b1a48536
2 changed files with 6 additions and 5 deletions

View file

@ -1300,18 +1300,18 @@ int ExchangeAPDU14a(const uint8_t *datain, int datainlen, bool activateField, bo
*dataoutlen = 0;
res = CmdExchangeAPDU(chainBlockNotLast, &datain[clen], vlen, vActivateField, dataout, maxdataoutlen, dataoutlen, &chaining);
if (res != PM3_SUCCESS) {
if (leaveSignalON == false)
if (leaveSignalON == false) {
DropField();
}
return 200;
}
// check R-block ACK
// TODO check this one...
if ((*dataoutlen == 0) && (chaining != chainBlockNotLast)) {
if (leaveSignalON == false)
if (leaveSignalON == false) {
DropField();
}
return 201;
}
@ -1323,6 +1323,7 @@ int ExchangeAPDU14a(const uint8_t *datain, int datainlen, bool activateField, bo
}
break;
}
} while (clen < datainlen);
} else {

View file

@ -842,7 +842,7 @@ static int seos_mutual_auth(uint8_t *randomICC, uint8_t *CRYPTOGRAM_Diversifier,
bool activate_field = false;
bool keep_field_on = true;
uint8_t aMUTUAL_AUTH[102];
uint8_t aMUTUAL_AUTH[102] = {0};
int aMUTUAL_AUTH_n = 0;
param_gethex_to_eol(mutual_auth, 0, aMUTUAL_AUTH, sizeof(aMUTUAL_AUTH), &aMUTUAL_AUTH_n);
int res = ExchangeAPDU14a(aMUTUAL_AUTH, aMUTUAL_AUTH_n, activate_field, keep_field_on, response, sizeof(response), &resplen);