if the card you have is a blank javacard, then you can
install the musclecard applet and use it with opensc.

muscle card applet provides a very basic filesystem
to opensc.

> --> I understand why shoud I write an emulation for opensc, but:

opensc works with pkcs#15 data structures. a) you have a card that
contains such data structures, then the card driver will read them
and opensc can use them. b) you don't. then the emulation layer
will create the same structures in (host) memory, based on data it
knows (e.g. hardcoded defaults) or can read from the card (data in
other formats).

the pkcs#15 data are mostly directory files, i.e. list of key on
the card with label and path, list of certiticates, list of data
objects, and so on.

> 1- this code is it enough to make card communicate with openssl, then a
> radius server? you mentionned in a last email that a card driver must be
> wrote too!

the card driver has basic commands such as "sign this data with that key".
without it, opensc wouldn't know how to ask such operations from the card.

but before opensc can do that it needs to know if there is any key on
the card, and if so, what ID / path that key has. such information is
in the pkcs#15 data structures (real or emulated).

> 2- what is the fonction shout I have to add the emulation code or are there
> any exemple for that?

sure. read some of the code in src/libopensc. card-cardos.c is an example for
the basic driver. estid or piv are examples of emulation drivers.

> I know, my questions reveals me as a beginner, but really I am :(
>
>  At the same time, I am optimistic! :)

good luck.

please keep the opensc-devel list as recipient on all emails,
so other people will read this discussion too and can help you too.

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

Reply via email to