From 9011bc01e3691472595659e4141e45a6c8fd0af6 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Sat, 20 Nov 2010 22:39:48 +0000 Subject: [PATCH] Don't return directly if we just have a command code. Mifare DESFire EV1 with authentication with AES or 3K3DES keys will require to perform CMACing on each frame, even those with just a command. So it does not break anything as of today, but would be a problem later on. --- libfreefare/mifare_desfire_authenticate.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libfreefare/mifare_desfire_authenticate.c b/libfreefare/mifare_desfire_authenticate.c index b71daad..1a6c82a 100644 --- a/libfreefare/mifare_desfire_authenticate.c +++ b/libfreefare/mifare_desfire_authenticate.c @@ -141,10 +141,6 @@ mifare_cryto_preprocess_data (MifareTag tag, void *data, size_t *nbytes, off_t o if (!key) return data; - // Return directly if we just have a command code. - if (1 == *nbytes) - return data; - switch (communication_settings & MDCM_MASK) { case MDCM_PLAIN: break;