Don't connect it to the build yet because the corresponding code in the library
has not been committed yet: I want to keep a track of modifications I do in the
VCS.
r565 was misinterpreted as a bug while it's a feature. Since it might be
inappropriate to do irreversible operations in an example, warn the user about
it.
- Lookup for crypto functions in libcrypto instead of libssl. Some systems
(Mac OS) do not provide libssl, and the other have crypto functions in
libcrypto but libssl is dynamically linked against libcrypto:
% ldd /usr/lib/libssl.so
/usr/lib/libssl.so:
libcrypto.so.6 => /lib/libcrypto.so.6 (0x800c00000)
libc.so.7 => /lib/libc.so.7 (0x800647000)
- Do not explicitly link against libssl (instead of libcrypto BTW): the
autotools magic already does this at some point;
- Improve error message when headers cannot be found.
After trying to tweak gindent so that it does not mess-up my ASCII art, give
and read the help of Vim to setup 'cinoptions' according to my needs
(cino=t0(0). This changeset reindent some bits that where not indented as they
should. A future commit will reindent the switch/case according to my (bad)
taste now that I have setup cindent correctly on my system (cino=t0(0:0).
This should avoid failure in some advanced use cases and when the example will be able to add user-provided data without data-loss.
Suggested by: Romuald Conty <rconty@il4p.fr>
The code can work with virtually any size of DESFire (since the operating
system embedded in the card handle almost everything), so there is no need for
us to distinguish cards of different sizes.
- 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.
- 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.