From: Frank M. <mo...@in...> - 2015-12-01 03:51:58
|
On Monday, November 30 at 10:57PM, Vincent Le Toux wrote: > Hi, > > I'm working on adding GIDS cards. This card is defined in a Microsoft > specification. > https://msdn.microsoft.com/en-us/library/windows/hardware/dn642100%28v=vs.85%29.aspx > > The main advantage of this card is that it is the only card (except PIV > cards) coming with a native minidriver (it do not need anything to be used > immediately) and it is read/write with the minidriver. > What is unusual is that it is not a PKCS#15 card and it uses BER TLV files > defined in the iso 7816-4:2013. > > The BER TLV file is not known / defined in OpenSC. > This is a new value of the file descriptor byte (added in iso 7816-4:2013 > 7.4.5) whose value is: 0x39 (111001). (the second file type added is SIMPLE > TLV structure) > Then each data is stored in a DO of this BER TLV file and is accessed with > a GET DATA / PUT DATA ADPU. > > I would like to modify the sc_path_t structure to add a new type named > SC_PATH_TYPE_FILE_ID_DO and modify the sc_pkcs15_read_file like functions > to use getdata instead of read binary / read record when accessing data. > => is it ok for you or do you have any comment ? If I understand correctly, you are talking about the DOs that are by definition (ISO 7816-4 2013) selectable objects. Generally speaking, this would be a good improvement to have in OpenSC. I hope I find time to check against a recent version of ISO 7816-15 if this is also a Path object which can be used in EF.CIA, for example. Anyway, I am not sure if this would be the easiest path for you to go. Historically, all cards that don't have a filesystem (e.g. PIV, OpenPGP) emulate a PKCS#15 like structure. This is because the OpenSC PKCS#15 framework assumes transparent EFs for historical reasons. You should especially look at the OpenPGP implementation, because the card you describe sounds very similar. Note that in OpenSC there is already sc_get/put_data. And there are several BER-TLV implementations (I know of): One in cwa14890.c and one in card-openpgp.c that uses sc_asn1_read_tag. *Please* do not add yet an other one... If there is a native minidriver, why do you want to add this card to OpenSC? Who uses this card and for what purpose? -- Frank Morgner Virtual Smart Card Architecture http://vsmartcard.sourceforge.net OpenPACE http://openpace.sourceforge.net IFD Handler for libnfc Devices http://sourceforge.net/projects/ifdnfc |