1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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.
This commit is contained in:
Werner Koch 2023-11-16 17:04:02 +01:00
parent def8f5f3d2
commit a33ad8f9bf
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 4 additions and 2 deletions

View File

@ -3049,7 +3049,9 @@ send_le (int slot, int class, int ins, int p0, int p1,
sw, (unsigned int)resultlen); sw, (unsigned int)resultlen);
if ( !retbuf && (sw == SW_SUCCESS || (sw & 0xff00) == SW_MORE_DATA)) 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"); log_debug (" dump: [all zero]\n");
else else
log_printhex (result, resultlen, " dump:"); log_printhex (result, resultlen, " dump:");

View File

@ -166,7 +166,7 @@ iso7816_select_mf (int slot)
{ {
int sw; 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); return map_sw (sw);
} }