Hello,
On Thu, Jun 30, 2011 at 22:13, Frank Morgner <morg...@informatik.hu-berlin.de> wrote: > Hi! > >> sc_enum_apps fails because sc_select_file returns an "unknown" SW 6A88 >> which gets translated to SC_ERROR_DATA_OBJECT_NOT_FOUND in iso7816.c. >> Looking at ISO7816-4, it is not listed as a "relevant SW" for SELECT >> command, which is failing (which also makes sense to me) > > Regarding the error codes of SELECT FILE, 7816 says: > See Tables 5 and 6 when relevant, e.g., '6283', '6284', '6A80', > '6A81', '6A82', '6A86', '6A87' > My interpretation is that those are not the only error codes that should > occur, but that they are examples. So I think checking for all errors is > more appropriate than checking only for the assumed to be relevant ones. "Defined by ISO" and "semantically correct" are IMHO not the same. The question is, should it be interpreted by sc_select_file or just passed "up" ? The case right here is IMHO less about what sc_select_file returns but more about what sc_enum_apps returns and what PKCS#15 code expects. Given that underlying functions can return virtually any SW, it makes no sense to blindly pass them up from sc_enum_apps, as this would mean that the above code should be checking for everything as well. So instead the logic in pkcs15.c should be fixed. _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel