libopensc: in iso7816 process_fci() decode Life Cycle Status byte (ISO 7816-4 2005, 5.3.3, tag '8A')
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3961 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
90ba3c769d
commit
5e805ecf2d
|
@ -383,6 +383,15 @@ static int iso7816_process_fci(sc_card_t *card, sc_file_t *file,
|
|||
if (tag != NULL && taglen) {
|
||||
sc_file_set_sec_attr(file, tag, taglen);
|
||||
}
|
||||
tag = sc_asn1_find_tag(ctx, p, len, 0x8A, &taglen);
|
||||
if (tag != NULL && taglen==1) {
|
||||
if (tag[0] == 0x01)
|
||||
file->status = SC_FILE_STATUS_CREATION;
|
||||
else if (tag[0] == 0x07 || tag[0] == 0x05)
|
||||
file->status = SC_FILE_STATUS_ACTIVATED;
|
||||
else if (tag[0] == 0x06 || tag[0] == 0x04)
|
||||
file->status = SC_FILE_STATUS_INVALIDATED;
|
||||
}
|
||||
file->magic = SC_FILE_MAGIC;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue