Commit graph

155 commits

Author SHA1 Message Date
Romain Tartiere
eca3c540ad Remove the FreeBSD hexdump(3) code.
It was used for easing up development but is not needed anymore.
2010-07-27 08:35:15 +00:00
Romain Tartiere
f5a95b1c57 Rename MC_STORE to MC_RESTORE.
It's easy now that the macro is defined in the libfreefare's code and not the libnfc's one.
2010-07-27 08:17:48 +00:00
Romain Tartiere
5779d6f945 Merge the freefare-desfire branch into trunk. 2010-07-26 21:48:18 +00:00
Romain Tartiere
3f6a142b57 Enhance the mifare-classic-write-ndef example.
- Use the new mifare_application_alloc() and mad_application_write API;
  - Deal with writing over multiple sectors with different keys.
2010-07-26 20:27:21 +00:00
Romain Tartiere
9ba6d198b8 Merge r487 from the libfreefare-desfire branch. 2010-07-26 20:21:02 +00:00
Romain Tartiere
f425ae30c6 Merge r486 from the libfreefare-desfire branch. 2010-07-26 20:20:22 +00:00
Romain Tartiere
7a08464e14 Add missing APIs from the documentation. 2010-07-26 18:27:56 +00:00
Romain Tartiere
5d62cee7d7 Merge r489 from the libfreefare-desfire branch. 2010-07-26 14:12:32 +00:00
Romain Tartiere
d186bfbaa3 Update after libnfc API change. 2010-07-21 11:41:58 +00:00
Romuald Conty
cae581eded constify mad related functions when applicable. 2010-07-20 07:47:58 +00:00
Romuald Conty
2668b48232 Minor mad man page fix. 2010-07-20 07:39:46 +00:00
Romuald Conty
4230d2b378 Add missing config.h include in mifare-classic-format example. Fix Issue 34. 2010-07-07 07:25:16 +00:00
Romain Tartiere
381598951a s/MifareSectorNumber/MifareClassicSectorNumber/ in man pages. 2010-07-03 10:08:48 +00:00
Romain Tartiere
42f2729404 Add TODO file. 2010-07-03 10:06:34 +00:00
Romain Tartiere
63008fd7c5 Add another implementation node. 2010-07-03 10:04:50 +00:00
Romain Tartiere
dbd3682174 New API functions mad_application_read(), mad_application_write(). 2010-07-03 10:04:06 +00:00
Romain Tartiere
9e5820b89e Allow mifare-classic-format to be run non-interactively. 2010-07-03 09:14:32 +00:00
Romain Tartiere
6cbb9f4f9d Add a fast-format feature in the mifare-classic-format utility to only erase MAD. 2010-07-03 09:09:26 +00:00
Romain Tartiere
163df002f2 Rename MifareSectorNumber to MifareClassicSectorNumber. 2010-07-03 06:31:28 +00:00
Romain Tartiere
8afbf4fe69 Add missing parentheses. 2010-07-03 06:28:35 +00:00
Romain Tartiere
4417a13f9f Don't assume a Mifare Classic Sector Number will always fit in a byte (currently it's a uint8_t but it exposes some problems). 2010-07-03 06:24:29 +00:00
Romain Tartiere
825d59e938 Sync mifare_classic_format_sector() prototype in freefare.h with the code. 2010-07-03 06:09:34 +00:00
Romain Tartiere
163ce56cc0 Refactoring Blocks vs. Sectors.
- mifare_classic_format_sector() now wants a sector instead of a block (the name was really disturbing);
  - New public API functions for Block <=> Sector conversions.
2010-07-01 23:19:45 +00:00
Romain Tartiere
cc5de33a56 Rename the test_mifare_classic_application unit test to test_mifare_application. 2010-07-01 21:57:49 +00:00
Romain Tartiere
f83918ee41 Fix MAD manipulation for Mifare Classic 4K.
- Allocate large blocks on Mifare Classic 4K in unit tests;
  - Constraints sector number in mad_set_aid();
  - Fix location of AID storage in mad_set_aid() (wrong variable name and offset, ECOPYPASTETOOFAST);
  - New API function mad_sector_reserved();
  - Use mad_sector_reserved() to avoid trying to use reserved sectors.
2010-07-01 21:44:40 +00:00
Romain Tartiere
541292505a Make mifare_application_alloc() accept size in bytes.
Fixes issue 31.
2010-07-01 17:05:44 +00:00
Romain Tartiere
92ae6036d2 Add unit tests for mad_read() and mad_write(). 2010-07-01 14:10:09 +00:00
Romain Tartiere
db0dd52339 Make the MAD read public key public (Rename it to insist on it's public nature). 2010-07-01 14:08:59 +00:00
Romain Tartiere
4a1415ed01 s/blocks/sectors/ 2010-07-01 13:25:14 +00:00
Romain Tartiere
0e1aded982 Document the mifare_tag_type enum. 2010-07-01 12:32:03 +00:00
Romain Tartiere
06e61a89d5 Remove clueless omitted test. 2010-07-01 11:00:25 +00:00
Romain Tartiere
829e28cfda Complete unit tests coverage of freefare.c.
The freefare_get_tag_friendly_name() function was not tested.  Call it from both supported cards unit tests suites.
2010-07-01 10:57:59 +00:00
Romain Tartiere
5a7a9391ae Move test_mifare_classic_sector_boundaries() in it's own file.
While here, sort out lines in test/Makefile.am.
2010-07-01 10:51:07 +00:00
Romain Tartiere
d5b91f9f3a Fix function name when reporting errors. 2010-07-01 10:44:03 +00:00
Romuald Conty
98e5b5a107 Fix mifare_application_alloc documentation: function takes "size" param in sectors unit. 2010-06-30 07:58:25 +00:00
Romuald Conty
97edcb45e8 factorize some code in examples/mifare-classic-write-ndef 2010-06-29 15:16:35 +00:00
Romuald Conty
ed69f90056 add MIFARE Classic 4K documentation reference. 2010-06-29 14:45:55 +00:00
Romuald Conty
0296e52d29 minor enhancement in mifare-classic-format progress display with 4k. 2010-06-29 08:26:50 +00:00
Romuald Conty
0447774e17 (mifare-classic-write-ndef) fix authentication block number with 4k. 2010-06-28 19:13:10 +00:00
Romuald Conty
d76ee4c2bd enhance progress display with MIFARE Classic 1K. 2010-06-28 13:23:49 +00:00
Romain Tartiere
5027d69b7e Silent down gcc44 -Wextra warnings. 2010-06-26 13:48:25 +00:00
Romain Tartiere
a9c026e8f2 Workaround a FreeBSD-specific bug in cutter. 2010-06-26 13:45:46 +00:00
Romain Tartiere
4ae3bf555d Display format operation progress. 2010-06-26 11:57:25 +00:00
Romain Tartiere
ebeaf9ad35 Fix endian.h inclusion. 2010-06-26 11:56:57 +00:00
Romain Tartiere
9c9d270b7e Fix typo in comment. I may need to buy a few more fingers to count on. 2010-06-25 00:30:32 +00:00
Romain Tartiere
335eef3e2f Various TLV enhancements:
- New API function: tlv_append();
  - Added unit tests for tlv_append();
  - New internal functions: tlv_record_length(), tlv_next(), tlv_sequence_length();
  - Rework tlv_decode() to use new internal functions.
2010-06-25 00:27:14 +00:00
Romain Tartiere
efe5bbad9e Force disconnect to avoid failure when the same key is usable as key A and key B. 2010-06-24 00:19:05 +00:00
Romain Tartiere
a4793d7052 Fix mad_write(). 2010-06-24 00:06:33 +00:00
Romain Tartiere
a235dbd0a9 Fix TLV terminator. 0xFE is part of TLV, not NDEF. 2010-06-23 23:21:47 +00:00
Romain Tartiere
4e3cccd071 Actually write some NDEF data in the mifare-classic-write-ndef example. 2010-06-23 02:05:28 +00:00