diff --git a/examples/mifare-desfire-write-ndef.c b/examples/mifare-desfire-write-ndef.c index 70002d7..3edea5a 100644 --- a/examples/mifare-desfire-write-ndef.c +++ b/examples/mifare-desfire-write-ndef.c @@ -108,22 +108,6 @@ main(int argc, char *argv[]) if (res < 0) errx (EXIT_FAILURE, "Authentication with PICC master key failed"); - uint8_t key_settings; - uint8_t max_keys; - mifare_desfire_get_key_settings(tags[i], &key_settings,&max_keys); - if ((key_settings & 0x08) == 0x08){ - - // Send Mifare DESFire ChangeKeySetting to change the PICC master key settings into : - // bit7-bit4 equal to 0000b - // bit3 equal to Xb, the configuration of the PICC master key MAY be changeable or frozen - // bit2 equal to 0b, CreateApplication and DeleteApplication commands are allowed with PICC master key authentication - // bit1 equal to 0b, GetApplicationIDs, and GetKeySettings are allowed with PICC master key authentication - // bit0 equal to Xb, PICC masterkey MAY be frozen or changeable - res = mifare_desfire_change_key_settings (tags[i],0x00); - if (res < 0) - errx (EXIT_FAILURE, "ChangeKeySettings failed"); - } - // Mifare DESFire Create Application with AID equal to EEEE10h, key settings equal to 09, NumOfKeys equal to 01h MifareDESFireAID aid = mifare_desfire_aid_new(0xEEEE10); res = mifare_desfire_create_application (tags[i], aid, 0x09, 1);