Hello Nguyễn,

Le 18/05/2012 11:59, Nguyễn Hồng Quân a écrit :
> I need a help to create pkcs15init profile structure so that I can 
> change/rewrite the canonical path.
>
> In general, the path to a file AABB in PKCS15 is as: 3F005015AABB, in 
> which 3F00 is the MF, 5015 is the PKCS15-AppDF's file-id.
>
> Now, because the virtual file system of my OpenPGP card (which is 
> non-pkcs15) is constructed as:
> MF (3F00)
>     |
>    +-- File_1 (AABB)
>     |
>    +-- File_2 (AACC)
>     |
>    +--- Directory (DDCC)
>            |
>           +-- File_3 (CCEE)
>
> the real path to the file is 3F00AABB.
> How would I define the profile file to omit the PKCS15-AppDF, i.e. the 
> "5015", in the path?

In OpenSC the pkcs15-init part is used mostly by cards that can natively 
support the on-card PKCS#15 file system.

The only exception is the Oberthur's card, that has producer specific on-card 
file system and data encoding.
In the OpenSC this card uses the emulator in its 'pkcs15-libopensc' part (like 
the openpgp card),
and uses extended pkcs15init API to implement the emulator of 'pkcs15-init' 
part .
The 'emulator' extension of the pkcs15init API consists in the 'emu_*' 
sc_pkcs15init_operations handlers
(src/libopensc/pkcs15-init.h).

You can look into oberthur.profile and src/pkcs15init/pkcs15-oberthur.c with 
the card's pkcs15init handlers.
No look too close into the src/pkcs15init/pkcs15-oberthur-awp.c. This file 
contains the implementing of the producer specific data encoding/decoding.

Unfortunately there is no more or less full documentation on the profiles,
other then the comments in profile files itself or in the sources.

Kind regards,
Viktor.


_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to