Merge pull request #2758 from kormax/desfire-recognize-javacard-applet-type

Fixes to DESFire product type recognition
This commit is contained in:
Iceman 2025-02-17 19:07:24 +01:00 committed by GitHub
commit d5e6464660
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -355,6 +355,10 @@ static nxp_cardtype_t getCardType(uint8_t type, uint8_t major, uint8_t minor) {
if (type == 0x81 && major == 0x42 && minor == 0x00)
return DESFIRE_EV2;
// Apple Wallet DESFire Applet
if (type == 0x91 && major == 0x62 && minor == 0x01)
return DESFIRE_EV2;
// Plus EV1
if (type == 0x02 && major == 0x11 && minor == 0x00)
return PLUS_EV1;
@ -377,7 +381,7 @@ static nxp_cardtype_t getCardType(uint8_t type, uint8_t major, uint8_t minor) {
// ref: https://www.nxp.com/docs/en/application-note/AN12343.pdf p7
static nxp_producttype_t getProductType(const uint8_t *versionhw) {
uint8_t product = versionhw[2];
uint8_t product = versionhw[1];
if (product == 0x01)
return DESFIRE_PHYSICAL;
@ -394,7 +398,7 @@ static nxp_producttype_t getProductType(const uint8_t *versionhw) {
static const char *getProductTypeStr(const uint8_t *versionhw) {
uint8_t product = versionhw[2];
uint8_t product = versionhw[1];
if (product == 0x01)
return "MIFARE DESFire native IC (physical card)";