From: Douglas E E. <dee...@gm...> - 2015-10-29 20:35:11
|
I see: https://github.com/eID-LV was created in 2014 by http://www.pmlp.gov.lv This looks like the Lativa gov published the code. It is based on OpenSC-0-12.2 Looks like no change have ever been made. So this may be you best source of information. On 10/29/2015 2:02 PM, Kaspars Dambis wrote: > Thanks for that explanation, Douglas! I really appreciate it! > > My understanding is that all of the init functions do the following: > > 1. Set a few card specific flags > 2. Parse the ATR iasecc_parse_ef_atr(card) to confirm ATR card match > 3. Select the AID > 4. Select the MF file Yes sort of. But first there are the match routines. This look for card ATRs or AIDs and then set the driver. The Init functions then setup for using the driver. There are some drivers that only look for the AID in the match functions, and don't look at the ATR other then to handle bugs between different card and/or applet inplementations. The AID should define the applet, or the specifications of the applet. This then allows for the same AID to be used for different implementations of the applet and on different cards. > > while the legacy init for Latvia eID (which works) does the following: > > 1. Piggy back on iasecc_init_oberthur() which does everything for its spec. > 2. Shortcircuits iasecc_oberthur_match() with iasecc_LATVIA_EID_match() which matches the ATR value and then sets OberthurIASECC_AID (!) > 3. Selects the MF file > > My question is -- what is the MF file and how does it relate to the selected AID. What should happen after the AID has been selected when running "opensc-tools -a", for example. Applets with the same AID should use the same file structure on the card. But an applet controls the location data. It should be in the applets specs or readable from the card. (PKCS#15 for example defines how to store certs, keys and other objects and attributes on a card.) (AIDs are registered and the 0xA0,0x00,0x00,0x00,0x77,0x01.0x08 appears to be registerd to Operthur.) ISO 7816-4 defines all the commands, and path info. MF is like the root directory of the file system. Google for: iso78160-4 The Cardwerk.com is fairly good. You can also purchase a copy from ISO. See: Section 5.1.1 File organization Back to the eID-LV... That code was from 2010, placed in github.com in 2014 and never modified. Since then they may have started using a different card or card vendor. So it is not clear if it still works or not. I would assume that if you used the Oberthur AID it will still work. (AIDs are registered and the 0xA0,0x00,0x00,0x00,0x77,0x01.0x08 appears to be registered to Oberthur.) > > Thanks! > Kaspars > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Opensc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensc-devel > -- Douglas E. Engert <DEE...@gm...> |