Hi Viktor, Sorry for the late answer for "type" and "ef_structure" question. In that case, the type is SC_FILE_TYPE_WORKING_EF and the ef_structure is SC_FILE_EF_TRANSPARENT.
On 05/05/2012 07:29 PM, Viktor Tarasov wrote: > Le 05/05/2012 07:14, Nguyễn Hồng Quân a écrit : >> Thanks Viktor, >> >> I found the defect at the function pgp_get_blob() in card-openpgp.c. >> There are lines: >> >> if (child->id == id) { >> (void) pgp_read_blob(card, child); >> *ret = child; >> return SC_SUCCESS; >> >> The problem is either: >> 1. The child blob does not exist, but there still exists its ID. >> 2. The result of pgp_read_blob(card, child) is not checked. >> >> This function is called by file_select and because it returns SUCCESS, >> it makes file_select SUCCESS although the blob does not exist. >> >> I think fixing 1 is better. What do you think? (Or the ID is >> pre-defined?) >> >> I'm new (and this driver was not written by me), so I'm grateful to >> receive your guidance. > First of all, > I do not know openpgp card and do not have this card to make the tests. > > Afaiu, the 'child' and it's 'ID' are the openpgp specific features that do > not have any relation to the 7816 standards. > They has to be hidden from the common OpenSC library part by the openpgp > card's driver. > > The authors of openpgp driver could explain better, > by from my point of view, > if the blob cannot be read, pgp_select() has to return 'file-not-found' or > other error. > In any case with such openpgp internal errors there is no possibility to > return a valid FCP/FCI and valid file length. > > Looking onto the code I suppose that the FCP returned by > pgp_select(public-key) belongs in fact to MF (or intermediate DF). > That's for, in my previous mail, I asked you > what are the 'type' and 'ef-structure' of the sc_file data returned by > 'successful' pgp_select() ? > -- Regards, Quân _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel