Fix MF selection APDU to use 0x0c in P2 (no data). The previous value of 0x00
is invalid according to IAS-ECC and resulted in 6A 86 on the Oberthur cards that we tested with.
This commit is contained in:
parent
471468260e
commit
3331a7f134
|
@ -275,13 +275,14 @@ iasecc_select_mf(struct sc_card *card, struct sc_file **file_out)
|
|||
sc_format_path("3F00", &path);
|
||||
path.type = SC_PATH_TYPE_FILE_ID;
|
||||
|
||||
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xA4, 0x00, 0x00);
|
||||
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xA4, 0x00, 0x0C);
|
||||
apdu.lc = path.len;
|
||||
apdu.data = path.value;
|
||||
apdu.datalen = path.len;
|
||||
apdu.resplen = sizeof(apdu_resp);
|
||||
apdu.resp = apdu_resp;
|
||||
|
||||
/* TODO: this might be obsolete now that 0x0c (no data) is default for p2 */
|
||||
if (card->type == SC_CARD_TYPE_IASECC_MI2)
|
||||
apdu.p2 = 0x04;
|
||||
|
||||
|
|
Loading…
Reference in New Issue