Hello,

OpenSC currently tries to read EF(DIR) and if this fails, doesn't find
the PKCS#15 application on the card.

Yet PKCS#15 tells:
a) 5.4.1: EF(DIR) is optional
b) 5.7.1/5.7.2:

PKCS #15 compliant IC cards should support direct application
selection as defined in
ISO/IEC 7816-4 Section 9 and ISO/IEC 7816-5, Section 6 (the full AID
is to be used as
parameter for a ‘SELECT FILE’ command). If direct application selection is not
supported, or several PKCS #15 applications reside on the card, an
EF(DIR) file with
contents as specified in Section 5.4.1 must be used.

and

The AID is used as the filename for DF(PKCS15) in order to facilitate
direct selection of the PKCS #15 application on multi-application
cards with only one
PKCS #15 application present.

Thus I believe that the logic should go:
1. see if EF(DIR) is present and use it if present
2. try selection by PKCS#15 DF name
3. try selection by other hard-coded DF names, as listed in dir.c variable apps.
4. try finding EF(ODF) directly in MF (as the code currently does, but
I don't know when/if this should be triggered currently at all)

Anyone knows if there are amendments in ISO7816-15 or if this could be
interpreted differently from PKCS#15 v1.1 as well?

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

Reply via email to