Mac OS X 10.4 has a native support for smart cards, called Tokend.
You can build and register such tokend for your card, and securityd
will call this tokend whenever your card should be used by applications
such as Safari, Mail, logon, ...
For more info:
How integrate OpenSC and Tokend?
Ideas from Stef:
- It's the Tokend 'framework' that takes care of the interaction with
the reader (card insertions, card reset, ...) and that provides a
transmit() function that allows tokend implementations to send APDUs
to the card
- OpenSC takes care of the card interaction to (by means of 'reader drivers'
such are reader-pcsc.c and reader-openct.c) so here's a conflict...
- Proposal: create a new reader driver, e.g. reader-tokend.c that calls
Tokend's trasmit() function when having to send an APDU.
- But what about the other functionality? Looking at the sc_reader_operations
struct in opensc.h, we can probably let most of the reader driver functions
(init, finish, release, detect_card_presence, lock, unlock, ...) return 'OK'
without realy doing something.
- This would require a new sc_establish_context() function that doesn't check
for readers and reader drivers, but always uses the 'tokend' reader driver;
that may be the only change to the existing OpenSC code (or we can simply
put this new sc_establish_context() into the tokend code).
This would allow use the use all pkcs15 functions on all available cards
without any card-specific code in the tokend.
Comments wellcome...