On Thursday 06 September 2007 18:35:14 Antonio Nastasi wrote:
> Hi,
> I am writing a driver for gemsafe Xpresso 16K with applet v1..
> But.. I have some questions:
> 1)Are there documentation for knowledge the function I must implement?

our best test tool is "pkcs11-tool --test --login". once that works everything 
essential is implemented. changeing pin codes and unblocking them should be
implemented too.

> 2)I am reading the drivers for other cards..In particular Which are the
> functions that i must implement for pkcs11 recognize the card?

you need both a low level driver - sign, decrypt, read directory, read files 
etc. - and a pkcs15 emulation - build in memory tables with the information
we expect for pkcs15 cards. the low level drivers are card-NAME.c,
the pkcs15 emulation drivers are pkcs15-NAME.c, both in src/libopensc/.

> 3)For opensc-tool i haven't problem: I have write a card-gemsafeV1.c and
> modified ctx.c and opensc.h and the  opensc-tool recognize the atr and
> initialize the card with aid of applet....
sound good so far!

> I am be able to read the 
> public EF with ID 0004 and recognize where begin and finish the
> files..... but what i must put in buf for example in list_files:
> static int gemsafeV1_list_files(sc_card_t *card, u8 *buf, size_t bufLen)

fill the buffer with file id's, i.e. two bytes per file name.
return the number of bytes you put into the buffer.

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to