On Tue, 2010-09-14 at 14:38 +0200, jons...@terra.es wrote: > [...] > > > > Not sure on other cards, but DNIe mark this situation by mean of > > > change on ATR status code from 03 90 00 to > > > 0F 65 81 (Memory error). Not sure what to do if detected this > > > situation: > > > 1. When data structures of your card are still readable, then match > on > > both ATRs. And fail gracefully on pin verification and privileged > > operations. > > > 2. When your card doesn't provide any data, then not recognising it > > should be fine. Or handle it like a card in manufacturing state. > > Adding invalidated DNIe's ATR to ATR List, some commands still are > available: > card_select_file() seems to work... but card fails on stablishing SM. > at card_get_serialnr() > > Attached comes ATR patch and resulting log to "pkcs15-tool -c" command
Are your logs complete? I can't see the APDU messages for the select commands. > So In your opinion when should invalidated DNIe report error, and > which error code? > Actually card code returns SC_ERROR_INTERNAL. Supposed that the attached log file is complete, then the card fails on receiving the first APDU. In this case the card provides only it's ATR and nothing more. This makes it less useful and thus I would prefer to ignore such a card. > (NOTE: Remember that this is not an official nor officially supported > work: Still waiting for Spanish autorities > to get support and permission to integrate DNIe into mainstream and > resolve LGPL/GPL conflict on published code ) > > Juan Antonio > _______________________________________________ > opensc-devel mailing list > opensc-devel@lists.opensc-project.org > http://www.opensc-project.org/mailman/listinfo/opensc-devel _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel