Romain Tartiere
18f84ceb7a
Detect cutter version. We will depend on 1.1.2 soon actually.
2010-04-08 12:01:14 +00:00
Romain Tartiere
0fb4e7e14c
Add infrastructure for generating the ChangeLog.
2010-04-07 15:36:24 +00:00
Romuald Conty
90fce89aee
next try to build under OpenBSD.
2010-04-07 14:19:08 +00:00
Romuald Conty
e68904d48a
attempt to build under OpenBSD.
2010-04-07 14:06:04 +00:00
Romuald Conty
5dc0575a8b
check functions letoh32 and htole32.
2010-04-07 10:23:20 +00:00
Romuald Conty
2566fb645c
needs libnfc >= 1.3.4 so configure will now detect it.
2010-04-07 10:22:23 +00:00
Romain Tartiere
e5fbfbe6b7
Replace UTF-8 what-seems-to-be-an "em dash" with a basic ASCII dash: ANSI C says source code should be written in ASCII.
2010-04-01 12:04:53 +00:00
Romain Tartiere
aacddc7aae
Add missing htole32() call in mifare_classic_init_value(). Fix Mifare Classic support on big-endian machines.
2010-03-31 22:46:13 +00:00
Romain Tartiere
73c50a544a
Remove deprecated API mifare_ultralight_get_uid(), mifare_classic_get_uid().
2010-03-30 16:24:37 +00:00
Romain Tartiere
574b068b3f
New API function freefare_get_tag_uid().
...
- Deprecates mifare_classic_get_uid() and mifare_ultralight_get_uid().
2010-03-30 16:18:58 +00:00
Romain Tartiere
85e7174a02
Fix weird UIDs for Mifare UltraLight (requires libnfc at r328)
2010-03-30 16:08:07 +00:00
Romain Tartiere
017029fbbe
Do not require a Mifare UltraLight TAG to be connected to get it's UID.
...
Submitted by: rosek86@gmail.com
2010-03-30 13:56:49 +00:00
Romain Tartiere
26aef03a48
Add man pages.
2010-03-30 12:54:49 +00:00
Romain Tartiere
3b737a11e8
Add access bit macros to ease-up writing code using the library.
2010-03-19 09:00:06 +00:00
Romain Tartiere
feb240ee73
Fix MAD CRC algorithm.
...
The CRC algorithm is not a standard CRC algorithm so rename it to nxp_crc() and adjust all related code.
2010-03-18 21:03:07 +00:00
Romain Tartiere
42692ccf54
Style.
2010-03-02 19:01:12 +00:00
Romain Tartiere
0f72871eb3
Instead of copying n fields, setup a pointer to the relevant supported_tag information in mifare_tag structures.
2010-03-01 14:19:48 +00:00
Romain Tartiere
0d4744001a
Add support for friendly tag names.
2010-03-01 14:04:47 +00:00
Romain Tartiere
62ddf57c53
Rework byteswap.h inclusion.
...
This header is not available on e.g. FreeBSD so detect it's presence in configure.ac and only include it if appropriate. Then, if byte order manipulation macros are not defined (old glibc like the one provided by Debian GNU/Linux) define them.
2010-02-25 18:02:54 +00:00
Romuald Conty
8b2de449c7
define le32toh and htole32, this allow to compile against libc that doesn't provide these functions (like Debian Lenny)
2010-02-24 21:52:45 +00:00
Romain Tartiere
8a62a843ac
Fix the test_mifare_classic_format unit test.
2010-02-23 14:22:23 +00:00
Romain Tartiere
ce006c3cc9
Change a secret ninja guru one-line expression into a function and document what it is supposed to do and how it does it.
2010-02-23 12:05:14 +00:00
Romain Tartiere
5f7f8ffe2a
Add support for MIFARE Classic 4K.
...
- New mifare_classic_first_sector_block(), mifare_classic_last_sector_block() functions to ease detection of sectors boundaries;
- New unit tests for mifare_classic_first_sector_block() and mifare_classic_last_sector_block();
- Start to update the API for consistently using blocks and not mixing blocks and sectors with mifare_classic_*() functions;
- Update the mifare-classic-format(1) example to handle MIFARE Classic 1k and 4k.
Many thanks to Johann Dantant from SpringCard for giving me MIFARE Classic 4k cards.
2010-02-23 02:12:18 +00:00
Romain Tartiere
24a9198f41
Fix wrong MIFARE Classic 4K SAK.
2010-02-23 02:03:45 +00:00
Romain Tartiere
ffcc3174b2
Add missing block_number <- block that prevented full cache hits.
2010-02-23 02:00:04 +00:00
Romain Tartiere
0f8ec71198
Add a unit test for mifare_classic_get_uid().
2010-02-22 17:30:50 +00:00
Romain Tartiere
e0d2405a30
Rework data structures allocations / frees.
...
- New mifare_*_tag_new() functions for allocating and initialising memory for a given MIFARE tag;
- Rename mifare_*_free_tag() to mifare_*_tag_free() for consistent names with mifare_*_tag_new() functions.
2010-02-22 12:25:23 +00:00
Romain Tartiere
e52fbccb4a
Remove unneeded header.
2010-02-22 12:05:48 +00:00
Romain Tartiere
74bc239a71
Abstract tag manipulation functions.
...
- Factorize Mifare*Tag as MifareTag;
- Factorize mifare_*_get_tags() / mifare_*_free_tags() as freefare_get_tags() and freefare_free_tags();
- Add a new freefare_get_tag_type() function to get a tag type;
- Update regression test suite;
- Update example.
While this is a major change that basically change all the API, programs using libfreefare should be easily modified by replacing any Mifare*Tag variable by a generic MifareTag one, adding a few lines of code to check the target's type using freefare_get_tag_type(), and changing any call to mifare_*_get_tags() / mifare_*_free_tags() by the generic freefare_get_tags() and freefare_free_tags() functions.
2010-02-19 14:50:18 +00:00
Romain Tartiere
2fd329e530
Do not make regression tests fail: spamming my shell is enouth to reminf me to fix this.
2010-02-19 14:40:28 +00:00
Romain Tartiere
d76da4697b
Update files headers and Ids.
2010-02-19 10:43:06 +00:00
Romain Tartiere
1b6d7ab210
Fix MIFARE UltraLight UID length.
...
Okay, either I lost some code somewhere, or I am really mad _AND_ fu**ing good at writing C code 'cause I am pretty sure I already fixed that at the very beginning of the UltraLight tags support and only after wrote all these test I don't have to modify so they pass.
2010-02-18 18:32:53 +00:00
Romain Tartiere
4c2da817f0
Fix MIFARE UltraLight related code (C99 compliance).
2010-02-18 18:13:48 +00:00
Romain Tartiere
6d5224472c
Fix MIFARE Classic unit tests default key.
...
According to the NXP documentation, default keys are 0xffffffffffff, not 0xa0a1a2a3a4a5 nor 0xd3f7d3f7d3f7.
2010-02-18 18:12:36 +00:00
Romain Tartiere
2380583ec6
fix the mifare_classic_transfer() function.
2010-02-18 18:09:34 +00:00
Romain Tartiere
acb00368c6
Mark test_mifare_classic_get_trailer_permission() as pending.
...
This test requires a valid MAD to be present on the MIFARE card which is not a requirement for testing MIFARE Classic tags but MAD.
2010-02-18 17:14:37 +00:00
Romain Tartiere
2f24959116
Fix default permissions.
2010-02-18 17:07:36 +00:00
Romain Tartiere
37c404b128
ilibfreefare: The transfer operation actually returns something.
2010-02-18 16:45:24 +00:00
Romain Tartiere
8903968ea3
Honor 'ISO C99 requires rest arguments to be used'.
2010-02-11 11:29:57 +00:00
Romain Tartiere
10b8b92eb9
Fix a brunch of warnings.
2010-01-22 16:06:26 +00:00
Romain Tartiere
ecdb1afb6e
Use the new ASSERT_INACTIVE macro in mifare_classic.c.
2010-01-19 23:15:10 +00:00
Romain Tartiere
ef081454c7
Add support for MIFARE UltraLight Tags.
...
Many thanks to Johann Dantant from SpringCard for giving me UltraLight cards.
While here, fix a few other problems in the autostuff.
2010-01-19 23:14:25 +00:00
Romain Tartiere
cdf4404dd9
Fix wrong variable name.
2010-01-19 23:10:01 +00:00
Romain Tartiere
7f87a0180d
Set _XOPEN_SOURCE to 600 for silencing gcc on GNU/Linux.
2010-01-13 13:53:45 +00:00
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