Romain Tartiere
0d1000e859
Fix regression tests build on FreeBSD.
...
While here, enhance error message when no MIFARE Classic tag can be found on the NFC device when running test_mifare_classic.la tests.
2010-01-12 15:38:56 +00:00
Romuald Conty
576801d5ff
Fix build when cutter is not available. (make distcheck ok)
2010-01-11 20:25:28 +00:00
Romain Tartiere
c1bcb966ea
Rework unit tests using cutter.
2010-01-11 20:14:30 +00:00
Romain Tartiere
935ab47c54
Update the mifare-classic-format example.
2010-01-10 14:24:26 +00:00
Romain Tartiere
d8b0a18752
Fix invalid memory access in CRC8 computation functions.
2010-01-09 02:55:42 +00:00
Romain Tartiere
1c62fc83e6
Handle the special case of sector #0 when formatting (sector is read-only).
2010-01-09 01:37:36 +00:00
Romain Tartiere
517eef97cf
The mifare_classic_format_sector prototype was changed on changeset 88. Update unit test accordingly.
2010-01-09 01:36:24 +00:00
Romain Tartiere
7a68e0f6ce
Fix MadAid field orders (transfer bytes order is big endian).
2010-01-08 22:44:33 +00:00
Romuald Conty
3e00c7899a
mifare_classic_get_tags() now return NULL when on failure and a one-entry array set to NULL when no tag is available (tags[0] == NULL).
2010-01-08 21:00:57 +00:00
Romuald Conty
756dc74969
move ACLOCAL_AMFLAGS to top Makefile.am
2010-01-08 20:58:29 +00:00
Romuald Conty
24ef79eca4
fix mifare_classic_get_uid().
2010-01-08 16:34:43 +00:00
Romuald Conty
75d7ba4adb
fix include header in mad.c
2010-01-08 16:17:21 +00:00
Romain Tartiere
2b76328c78
Unbreak example and add autotool stuff to help building.
2010-01-08 13:40:39 +00:00
Romain Tartiere
0c0d8e77a3
Add Makefile.am forgotten in the previous commit.
2010-01-08 11:51:40 +00:00
Romain Tartiere
32e740ea6d
Split out autojunk and actual code files.
2010-01-08 11:46:23 +00:00
Romain Tartiere
8a9d90210a
Add MAD CRC support.
2010-01-08 11:24:30 +00:00
Romain Tartiere
54f4a84ead
Fix Id svn:keywords (ECOPYPASTETOOFAST).
2010-01-08 09:40:52 +00:00
Romain Tartiere
7fd413789a
Add error checking to mifare_classic_connect(), mifare_classic_disconnect().
...
Do not assume nfc_initiator_select_tag() and nfc_initiator_deselect_tag() will not return an error if the provided tag is supposed to be ready for the operation (it might have move out of the field), and let the error propagate through libfreefare to the application calling the functions.
2010-01-08 08:29:19 +00:00
Romuald Conty
76a8c8e8b1
add an example draft mifare-classic-format, a tool which can be usefull to debug :)
2010-01-06 23:44:17 +00:00
Romuald Conty
7d1495940f
add an accessor to UID contained in MifareClassicTag
2010-01-06 23:42:06 +00:00
Romuald Conty
fc3c23502c
add C++ compatibility.
2010-01-06 23:40:30 +00:00
Romain Tartiere
4582bfbf11
add freefare.h forgotten in previous commit.
2010-01-03 19:53:58 +00:00
Romain Tartiere
073b67be48
merge all includes into a single freefare.h header.
...
libmad already has a mad.h file libfreefare would conflict with.
2009-12-26 18:16:22 +00:00
Romuald Conty
3c4d6ff095
Tag is no more active if authentication failed.
2009-12-26 03:37:20 +00:00
Romuald Conty
a5dd66f77d
put MifareSectorNumber type in a new mifare_common.h header.
...
API changed: mifare_classic_format_sector() now takes a MifareSectorNumber in argument.
2009-12-23 15:26:57 +00:00
Romain Tartiere
4bf33cc707
Fix autotools on FreeBSD.
...
Endianness fun is not provided by the same header file on GNU/Linux (endian.h) and FreeBSD (sys/endian.h). Add some magic for the autotools to detect the correct header file. While here, add AC_C_INLINE: it's reported as missing by autoscan(1).
2009-12-22 20:48:13 +00:00
Romain Tartiere
58d83ae20a
Enforce unit tests name consistency.
2009-12-21 13:58:53 +00:00
Romain Tartiere
3cab1523eb
Introduce MAD application management functions.
2009-12-21 13:54:27 +00:00
Romain Tartiere
0ae63092bd
Fix mad_get_aid(): sector 0x10 is reserved and cannot be used.
2009-12-21 13:31:42 +00:00
Romain Tartiere
c7b8574e23
Make MAD Application Identifiers (AID) structure public as MadAid.
...
- Changed mad_get_aid() and mad_set_aid() ABI;
- Update unit test;
2009-12-21 03:02:15 +00:00
Romain Tartiere
00ca4579c9
- Rename MifareSector to MifareSectorNumber;
...
- Fix includes (use '<>' instead of '""');
- Add -I. to cc arguments.
2009-12-21 02:35:28 +00:00
Romain Tartiere
89dd817a63
Rename mifare_application_directory.[ch] to mad.[ch].
2009-12-21 00:40:07 +00:00
Romain Tartiere
9478706550
Add MIFARE Application Directory (MAD) version 1 & 2 support (modulo CRC).
2009-12-21 00:02:40 +00:00
Romain Tartiere
a317799f01
Don't crash when no MIFARE target is present when running the regression tests suite.
2009-12-20 23:42:58 +00:00
Romain Tartiere
253d49eef8
Add forgotten regression test for mifare_classic_trailer_block().
2009-12-19 22:59:38 +00:00
Romain Tartiere
f9c2b6e9e3
Mark functions parameters as `const' when applicable.
2009-12-19 22:55:50 +00:00
Romain Tartiere
7ed4561f74
New API function: mifare_classic_trailer_block().
2009-12-19 06:10:44 +00:00
Romain Tartiere
b97012ac05
Add regression test suite.
2009-12-19 02:06:21 +00:00
Romain Tartiere
1f40cc97c7
New API function: mifare_classic_format_sector().
2009-12-19 02:01:04 +00:00
Romain Tartiere
ba8c9b5126
Install a libfreefare.pc pkg-config module.
2009-12-18 21:31:45 +00:00
Romain Tartiere
967f9822e9
Add pointers to the implementation sources.
2009-12-18 21:13:09 +00:00
Romain Tartiere
bb486e4318
Import libfreefare into trunk.
2009-12-18 20:32:25 +00:00