added support for sc_path_t with only aid set
This commit is contained in:
parent
73715e37d9
commit
45fe96579f
|
@ -462,6 +462,11 @@ iso7816_select_file(struct sc_card *card, const struct sc_path *in_path, struct
|
|||
pathtype = in_path->type;
|
||||
|
||||
if (in_path->aid.len) {
|
||||
if (!pathlen) {
|
||||
memcpy(path, in_path->aid.value, in_path->aid.len);
|
||||
pathlen = in_path->aid.len;
|
||||
pathtype = SC_PATH_TYPE_DF_NAME;
|
||||
} else {
|
||||
/* First, select the application */
|
||||
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xA4, 4, 0);
|
||||
apdu.data = in_path->aid.value;
|
||||
|
@ -478,6 +483,7 @@ iso7816_select_file(struct sc_card *card, const struct sc_path *in_path, struct
|
|||
|| pathtype == SC_PATH_TYPE_DF_NAME)
|
||||
pathtype = SC_PATH_TYPE_FROM_CURRENT;
|
||||
}
|
||||
}
|
||||
|
||||
sc_format_apdu(card, &apdu, SC_APDU_CASE_4_SHORT, 0xA4, 0, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue