diff options
author | Werner Koch <wk@gnupg.org> | 2023-11-16 17:04:02 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2023-11-16 17:04:02 +0100 |
commit | a33ad8f9bf92d144285769a7d17891c595365fa2 (patch) | |
tree | 7c6974cfcd712d9d277715d394b6edd3820a841c /scd | |
parent | gpg,gpgsm: Hide password in debug output also for asked passwords. (diff) | |
download | gnupg2-a33ad8f9bf92d144285769a7d17891c595365fa2.tar.xz gnupg2-a33ad8f9bf92d144285769a7d17891c595365fa2.zip |
scd: Minor debug output tweak
* scd/apdu.c (send_le): Do not dump "[all zero]" if tehre is no data.
* scd/iso7816.c (iso7816_select_mf): Cosmetic fix.
Diffstat (limited to 'scd')
-rw-r--r-- | scd/apdu.c | 4 | ||||
-rw-r--r-- | scd/iso7816.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index deb1134e6..7f3c320d2 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -3049,7 +3049,9 @@ send_le (int slot, int class, int ins, int p0, int p1, sw, (unsigned int)resultlen); if ( !retbuf && (sw == SW_SUCCESS || (sw & 0xff00) == SW_MORE_DATA)) { - if (all_zero_p (result, resultlen)) + if (!resultlen) + ; + else if (all_zero_p (result, resultlen)) log_debug (" dump: [all zero]\n"); else log_printhex (result, resultlen, " dump:"); diff --git a/scd/iso7816.c b/scd/iso7816.c index 47e16056c..703f1fdab 100644 --- a/scd/iso7816.c +++ b/scd/iso7816.c @@ -166,7 +166,7 @@ iso7816_select_mf (int slot) { int sw; - sw = apdu_send_simple (slot, 0, 0x00, CMD_SELECT_FILE, 0x000, 0x0c, -1, NULL); + sw = apdu_send_simple (slot, 0, 0x00, CMD_SELECT_FILE, 0x00, 0x0c, -1, NULL); return map_sw (sw); } |