recognize short EF identifier
This commit is contained in:
parent
a05e7ca84d
commit
0790969b97
|
@ -430,6 +430,10 @@ iso7816_process_fci(struct sc_card *card, struct sc_file *file,
|
|||
if (tag != NULL && taglen)
|
||||
sc_file_set_sec_attr(file, tag, taglen);
|
||||
|
||||
tag = sc_asn1_find_tag(ctx, p, len, 0x88, &taglen);
|
||||
if (tag != NULL && taglen == 1)
|
||||
file->sid = *tag;
|
||||
|
||||
tag = sc_asn1_find_tag(ctx, p, len, 0x8A, &taglen);
|
||||
if (tag != NULL && taglen==1) {
|
||||
if (tag[0] == 0x01)
|
||||
|
|
|
@ -225,7 +225,8 @@ typedef struct sc_file {
|
|||
unsigned int type, ef_structure, status; /* See constant values defined above */
|
||||
unsigned int shareable; /* true(1), false(0) according to ISO 7816-4:2005 Table 14 */
|
||||
size_t size; /* Size of file (in bytes) */
|
||||
int id; /* Short file id (2 bytes) */
|
||||
int id; /* file identifier (2 bytes) */
|
||||
int sid; /* short EF identifier (1 byte) */
|
||||
struct sc_acl_entry *acl[SC_MAX_AC_OPS]; /* Access Control List */
|
||||
|
||||
int record_length; /* In case of fixed-length or cyclic EF */
|
||||
|
|
|
@ -786,8 +786,10 @@ static int do_info(int argc, char **argv)
|
|||
st = "Unknown File";
|
||||
break;
|
||||
}
|
||||
printf("\n%s ID %04X\n\n", st, file->id);
|
||||
printf("%-15s%s\n", "File path:", path_to_filename(&path, '/'));
|
||||
printf("\n%s ID %04X", st, file->id);
|
||||
if (file->sid)
|
||||
printf(", SFI %02X", file->sid);
|
||||
printf("\n\n%-15s%s\n", "File path:", path_to_filename(&path, '/'));
|
||||
printf("%-15s%lu bytes\n", "File size:", (unsigned long) file->size);
|
||||
|
||||
if (file->type == SC_FILE_TYPE_DF) {
|
||||
|
|
Loading…
Reference in New Issue