From 1c2ff2b26371b5432a6130571c6f45a2bd2f6e42 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Fri, 8 Apr 2011 09:32:56 +0000 Subject: [PATCH] apply a patch suggested by Valentijn Sessink. See Issue 56. --- src/mfoc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mfoc.c b/src/mfoc.c index 7dbbf5b..d410359 100644 --- a/src/mfoc.c +++ b/src/mfoc.c @@ -787,6 +787,17 @@ int mf_enhanced_auth(int e_sector, int a_sector, mftag t, mfreader r, denonce *d ERR ("while requesting encrypted tag-nonce"); exit (EXIT_FAILURE); } + + // Finally we want to send arbitrary parity bits + if (!nfc_configure(r.pdi, NDO_HANDLE_PARITY, true)) { + nfc_perror (r.pdi, "nfc_configure parity restore M"); + exit (EXIT_FAILURE); + } + + if (!nfc_configure(r.pdi, NDO_HANDLE_CRC, true)) { + nfc_perror (r.pdi, "nfc_configure crc restore M"); + exit (EXIT_FAILURE); + } // Save the encrypted nonce NtEnc = bytes_to_num(Rx, 4);