return 0;
}
-static bool smart_getATR(smart_card_atr_t *card)
+bool smart_getATR(smart_card_atr_t *card)
{
if (UseAlternativeSmartcardReader) {
return pcscGetATR(card);
if (!silent) PrintAndLogEx(WARNING, "smart card select failed");
return 1;
}
+
+ if (!card.atr_len) {
+ if (!silent) PrintAndLogEx(ERR, "can't get ATR from a smart card");
+ return 1;
+ }
// print header
PrintAndLogEx(INFO, "--- Smartcard Information ---------");