This commit is contained in:
iceman1001 2023-10-18 20:34:35 +02:00
commit 1f3cf80898
16 changed files with 139 additions and 107 deletions

View file

@ -74,15 +74,15 @@ bool IsHIDSamPresent(bool verbose) {
// SAM identification
smart_card_atr_t supported[] = {
{15, {0x3B, 0x95, 0x96, 0x80, 0xB1, 0xFE, 0x55, 0x1F, 0xC7, 0x47, 0x72, 0x61, 0x63, 0x65, 0x13}},
{11, {0x3b, 0x90, 0x96, 0x91, 0x81, 0xb1, 0xfe, 0x55, 0x1f, 0xc7, 0xd4}},
{15, {0x3B, 0x95, 0x96, 0x80, 0xB1, 0xFE, 0x55, 0x1F, 0xC7, 0x47, 0x72, 0x61, 0x63, 0x65, 0x13}},
{11, {0x3b, 0x90, 0x96, 0x91, 0x81, 0xb1, 0xfe, 0x55, 0x1f, 0xc7, 0xd4}},
};
bool found = false;
for (int i = 0; i < sizeof(supported) / sizeof(supported[0]); i++) {
if ((card.atr_len == supported[i].atr_len) &&
(memcmp(card.atr, supported[i].atr, supported[i].atr_len) == 0)) {
found = true;
break;
(memcmp(card.atr, supported[i].atr, supported[i].atr_len) == 0)) {
found = true;
break;
}
}
if (found == false) {