This commit is contained in:
merlokk 2021-07-11 18:57:44 +03:00
commit e4bdecf30e
2 changed files with 31 additions and 31 deletions

View file

@ -964,19 +964,19 @@ int DesfireChangeKeySettings(DesfireContext *dctx, uint8_t *data, size_t len) {
} }
static void PrintKeyType(uint8_t keytype) { static void PrintKeyType(uint8_t keytype) {
switch(keytype) { switch (keytype) {
case 00: case 00:
PrintAndLogEx(SUCCESS, "Key: 2TDEA"); PrintAndLogEx(SUCCESS, "Key: 2TDEA");
break; break;
case 01: case 01:
PrintAndLogEx(SUCCESS, "Key: 3TDEA"); PrintAndLogEx(SUCCESS, "Key: 3TDEA");
break; break;
case 02: case 02:
PrintAndLogEx(SUCCESS, "Key: AES"); PrintAndLogEx(SUCCESS, "Key: AES");
break; break;
default: default:
PrintAndLogEx(SUCCESS, "Key: unknown: 0x%02x", keytype); PrintAndLogEx(SUCCESS, "Key: unknown: 0x%02x", keytype);
break; break;
} }
} }

View file

@ -266,8 +266,8 @@ bool PrintChannelModeWarning(uint8_t cmd, DesfireSecureChannel secureChannel, De
if (AllowedChannelModes[i].cmd == cmd) { if (AllowedChannelModes[i].cmd == cmd) {
// full compare // full compare
if (AllowedChannelModes[i].secureChannel == secureChannel && if (AllowedChannelModes[i].secureChannel == secureChannel &&
(AllowedChannelModes[i].cmdSet == cmdSet || (AllowedChannelModes[i].cmdSet == DCCNative && cmdSet == DCCNativeISO)) && (AllowedChannelModes[i].cmdSet == cmdSet || (AllowedChannelModes[i].cmdSet == DCCNative && cmdSet == DCCNativeISO)) &&
AllowedChannelModes[i].commMode == commMode){ AllowedChannelModes[i].commMode == commMode) {
found = true; found = true;
break; break;
@ -275,9 +275,9 @@ bool PrintChannelModeWarning(uint8_t cmd, DesfireSecureChannel secureChannel, De
// ev1 plain and mac are the same // ev1 plain and mac are the same
if (AllowedChannelModes[i].secureChannel == secureChannel && if (AllowedChannelModes[i].secureChannel == secureChannel &&
AllowedChannelModes[i].secureChannel == DACEV1 && AllowedChannelModes[i].secureChannel == DACEV1 &&
(AllowedChannelModes[i].cmdSet == cmdSet || (AllowedChannelModes[i].cmdSet == DCCNative && cmdSet == DCCNativeISO)) && (AllowedChannelModes[i].cmdSet == cmdSet || (AllowedChannelModes[i].cmdSet == DCCNative && cmdSet == DCCNativeISO)) &&
(commMode == DCMPlain || commMode == DCMMACed)){ (commMode == DCMPlain || commMode == DCMMACed)) {
found = true; found = true;
break; break;