summaryrefslogtreecommitdiffstats
path: root/scd/app-p15.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-06-16 20:29:47 +0200
committerWerner Koch <wk@gnupg.org>2021-06-18 17:42:38 +0200
commit44f977d0e332e77fb8a775c4837c00118bbe08cb (patch)
tree25cad289fd3f380c219d0e467a348a4e6e962808 /scd/app-p15.c
parentscd: Fix RESET handling. (diff)
downloadgnupg2-44f977d0e332e77fb8a775c4837c00118bbe08cb.tar.xz
gnupg2-44f977d0e332e77fb8a775c4837c00118bbe08cb.zip
scd: Improve reading of binary records.
* scd/iso7816.c (iso7816_read_binary_ext): Handle the 0x6a86 SW the same as 6b00. * scd/apdu.c (apdu_get_atr): Modify debug messages. * scd/app-p15.c (app_select_p15): Print FCI on error. (read_p15_info): Clean up diag in presence of debug options. -- Some cards return 6a86 instead of 6b00. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd/app-p15.c')
-rw-r--r--scd/app-p15.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scd/app-p15.c b/scd/app-p15.c
index 0530d377c..820e335c3 100644
--- a/scd/app-p15.c
+++ b/scd/app-p15.c
@@ -3791,8 +3791,8 @@ read_p15_info (app_t app)
log_printf ("\n");
}
- log_info ("p15: atr ..........: ");
atr = apdu_get_atr (app_get_slot (app), &atrlen);
+ log_info ("p15: atr ..........: ");
if (!atr)
log_printf ("[error]\n");
else
@@ -6040,7 +6040,11 @@ app_select_p15 (app_t app)
if (s && n == 2)
def_home_df = buf16_to_ushort (s);
else
- log_error ("p15: select(AID) did not return the DF\n");
+ {
+ if (fcilen)
+ log_printhex (fci, fcilen, "fci:");
+ log_error ("p15: select(AID) did not return the DF\n");
+ }
}
app->app_local->home_df = def_home_df;