select card before trying to send apdu, makes the pm3 not get stuck

This commit is contained in:
iceman1001 2022-01-03 22:09:42 +01:00
parent 0a4c9f83ac
commit e1bcbd8159

View file

@ -53,7 +53,7 @@ static bool executeCrypto(uint8_t ins, uint8_t *src, uint8_t *dest) {
int resp_len = 0; int resp_len = 0;
uint8_t dec[11] = {0}; uint8_t dec[11] = {0};
ExchangeAPDUSC(false, cmd, sizeof(cmd), false, true, dec, sizeof(dec), &resp_len); ExchangeAPDUSC(false, cmd, sizeof(cmd), true, true, dec, sizeof(dec), &resp_len);
if (resp_len == 10) { if (resp_len == 10) {
memcpy(dest, dec, 8); memcpy(dest, dec, 8);
return true; return true;