mifare-desfire-write-ndef, allow changing configuration and the PICC master key.
This commit is contained in:
parent
51269a92fa
commit
2914460a13
1 changed files with 3 additions and 3 deletions
|
@ -122,7 +122,7 @@ main(int argc, char *argv[])
|
||||||
// bit2 equal to 0b, CreateApplication and DeleteApplication commands are allowed with PICC master key authentication
|
// 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
|
// 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
|
// bit0 equal to Xb, PICC masterkey MAY be frozen or changeable
|
||||||
res = mifare_desfire_change_key_settings (tags[i],0x00);
|
res = mifare_desfire_change_key_settings (tags[i],0x09);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
errx (EXIT_FAILURE, "ChangeKeySettings failed");
|
errx (EXIT_FAILURE, "ChangeKeySettings failed");
|
||||||
}
|
}
|
||||||
|
@ -143,8 +143,8 @@ main(int argc, char *argv[])
|
||||||
res = mifare_desfire_authenticate (tags[i], 0, key);
|
res = mifare_desfire_authenticate (tags[i], 0, key);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
errx (EXIT_FAILURE, "Authentication with NDEF Tag Application master key failed");
|
errx (EXIT_FAILURE, "Authentication with NDEF Tag Application master key failed");
|
||||||
// Mifare DESFire ChangeKeySetting with key settings equal to 00000000b
|
// Mifare DESFire ChangeKeySetting with key settings equal to 00001001b
|
||||||
res = mifare_desfire_change_key_settings (tags[i],0x00);
|
res = mifare_desfire_change_key_settings (tags[i],0x09);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
errx (EXIT_FAILURE, "ChangeKeySettings failed");
|
errx (EXIT_FAILURE, "ChangeKeySettings failed");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue