From ce443d50caf68a3526d2d177ce8d769b0190d1ab Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Sun, 3 Jun 2012 21:02:54 +0000 Subject: [PATCH] Rename abtUid from struct mifare_param_auth into abtAuthUid: this is not the UID while using 7-bytes UID MIFARE Classic tags. --- utils/mifare.h | 2 +- utils/nfc-mfclassic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/mifare.h b/utils/mifare.h index 3ccf5ae..57d5344 100644 --- a/utils/mifare.h +++ b/utils/mifare.h @@ -55,7 +55,7 @@ typedef enum { // MIFARE command params struct mifare_param_auth { uint8_t abtKey[6]; - uint8_t abtUid[4]; + uint8_t abtAuthUid[4]; }; struct mifare_param_data { diff --git a/utils/nfc-mfclassic.c b/utils/nfc-mfclassic.c index 97b4fe6..de6ab85 100644 --- a/utils/nfc-mfclassic.c +++ b/utils/nfc-mfclassic.c @@ -175,7 +175,7 @@ authenticate(uint32_t uiBlock) size_t key_index; // Set the authentication information (uid) - memcpy(mp.mpa.abtUid, nt.nti.nai.abtUid + nt.nti.nai.szUidLen - 4, 4); + memcpy(mp.mpa.abtAuthUid, nt.nti.nai.abtUid + nt.nti.nai.szUidLen - 4, 4); // Should we use key A or B? mc = (bUseKeyA) ? MC_AUTH_A : MC_AUTH_B;