timmerk / mfcuk

Automatically exported from code.google.com/p/mfcuk
GNU General Public License v2.0
0 stars 0 forks source link

mfcuk + libnfc 1.5.x #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using the libnfc 1.5 with mfcuk (i have to use it. the PR532 + UART) need 
it. 

The problem is: looks like some APIs from NFC lib changed. 

libnfc (from trunk)

mfcuk from trunk

Ubuntu 11.04, 64 bits

error:

[~/mfcuk-read-only] make 
make  all-recursive
make[1]: Betrete Verzeichnis '/home/xxx/mfcuk-read-only'
Making all in src
make[2]: Betrete Verzeichnis '/home/xxx/mfcuk-read-only/src'
  CC     crapto1.o
  CC     crypto1.o
  CC     mfcuk_finger.o
mfcuk_finger.c: In function ‘mfcuk_finger_skgt_decoder’:
mfcuk_finger.c:68:20: warning: unused variable ‘car_number’
  CC     mfcuk_keyrecovery_darkside.o
mfcuk_keyrecovery_darkside.c: In function ‘mfcuk_verify_key_block’:
mfcuk_keyrecovery_darkside.c:265:5: error: too few arguments to function 
‘nfc_initiator_transceive_bytes’
/usr/local/include/nfc/nfc.h:80:19: note: declared here
mfcuk_keyrecovery_darkside.c:272:5: warning: dereferencing type-punned pointer 
will break strict-aliasing rules
mfcuk_keyrecovery_darkside.c: In function ‘mfcuk_key_recovery_block’:
mfcuk_keyrecovery_darkside.c:417:5: error: too few arguments to function 
‘nfc_initiator_transceive_bytes’
/usr/local/include/nfc/nfc.h:80:19: note: declared here
mfcuk_keyrecovery_darkside.c:427:5: warning: dereferencing type-punned pointer 
will break strict-aliasing rules
mfcuk_keyrecovery_darkside.c: In function ‘main’:
mfcuk_keyrecovery_darkside.c:1108:21: warning: dereferencing type-punned 
pointer will break strict-aliasing rules
mfcuk_keyrecovery_darkside.c:1326:61: warning: comparison between signed and 
unsigned integer expressions
mfcuk_keyrecovery_darkside.c:1488:13: warning: dereferencing type-punned 
pointer will break strict-aliasing rules
mfcuk_keyrecovery_darkside.c:1539:5: warning: dereferencing type-punned pointer 
will break strict-aliasing rules
mfcuk_keyrecovery_darkside.c:1545:9: warning: dereferencing type-punned pointer 
will break strict-aliasing rules
mfcuk_keyrecovery_darkside.c: At top level:
crapto1.h:60:23: warning: ‘parity’ defined but not used
mfcuk_keyrecovery_darkside.c: In function ‘main’:
mfcuk_keyrecovery_darkside.c:992:5: warning: ignoring return value of 
‘system’, declared with attribute warn_unused_result
make[2]: *** [mfcuk_keyrecovery_darkside.o] Fehler 1
make[2]: Verlasse Verzeichnis '/home/victor.pereira/mfcuk-read-only/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/victor.pereira/mfcuk-read-only'
make: *** [all] Fehler 2

Original issue reported on code.google.com by victor.p...@adyton.net on 23 Sep 2011 at 8:36

GoogleCodeExporter commented 9 years ago
here are the changes needed for the latest libnfc trunk

===================================================================
--- mfcuk_keyrecovery_darkside.c    (revision 50)
+++ mfcuk_keyrecovery_darkside.c    (working copy)
@@ -262,7 +262,7 @@
     nfc_configure (pnd, NDO_EASY_FRAMING, false);

     // Request plain tag-nonce
-    if (!nfc_initiator_transceive_bytes(pnd,abtAuth,4,abtRx,&szRx))
+    if (!nfc_initiator_transceive_bytes(pnd,abtAuth,4,abtRx,&szRx,NULL))
     {
         return MFCUK_FAIL_COMM;
     }
@@ -414,7 +414,7 @@

     // Request plain tag-nonce
     //printf("Nt: ");
-    if (!nfc_initiator_transceive_bytes(pnd,abtAuth,4,abtRx,&szRx))
+    if (!nfc_initiator_transceive_bytes(pnd,abtAuth,4,abtRx,&szRx,NULL))
     {
         //printf("\n\nFAILURE - Failed to get TAG NONCE!!!\n\n");
         return MFCUK_FAIL_COMM;

Original comment by maxx...@gmail.com on 24 Sep 2011 at 6:30

GoogleCodeExporter commented 9 years ago
Should be fixed in r52.

Feel free to feedback :)

Original comment by romu...@libnfc.org on 25 Sep 2011 at 4:12