IASECC/CPX: revert removal of 3F00 from the path

Few years ago, the commit 03628449b7
did squash the 3F00nnnn path to nnnn. For instance, 3F002F00
becomes 2F00. It is an issue such as:
  00000200 [139681798813440] APDU: 00 A4 09 04 02 2F 00
  00029790 [139681798813440] SW: 6A 82

Fix: issue #2231
This commit is contained in:
Vincent JARDIN 2021-02-10 18:37:26 +00:00 committed by Frank Morgner
parent 76507508d7
commit fc0df4e5d5
1 changed files with 3 additions and 2 deletions

View File

@ -917,9 +917,10 @@ iasecc_select_file(struct sc_card *card, const struct sc_path *path,
sc_log(ctx, "iasecc_select_file() path:%s", sc_print_path(path));
sc_print_cache(card);
if (path->type != SC_PATH_TYPE_DF_NAME
if ((!iasecc_is_cpx(card)) &&
(path->type != SC_PATH_TYPE_DF_NAME
&& lpath.len >= 2
&& lpath.value[0] == 0x3F && lpath.value[1] == 0x00) {
&& lpath.value[0] == 0x3F && lpath.value[1] == 0x00)) {
sc_log(ctx, "EF.ATR(aid:'%s')", card->ef_atr ? sc_dump_hex(card->ef_atr->aid.value, card->ef_atr->aid.len) : "");
rv = iasecc_select_mf(card, file_out);