diff options
| author | Werner Koch <[email protected]> | 2021-06-16 18:29:47 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2021-06-18 15:42:38 +0000 |
| commit | 44f977d0e332e77fb8a775c4837c00118bbe08cb (patch) | |
| tree | 25cad289fd3f380c219d0e467a348a4e6e962808 /scd/apdu.c | |
| parent | scd: Fix RESET handling. (diff) | |
| download | gnupg-44f977d0e332e77fb8a775c4837c00118bbe08cb.tar.gz gnupg-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 <[email protected]>
Diffstat (limited to 'scd/apdu.c')
| -rw-r--r-- | scd/apdu.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index ec495e374..8896508df 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2614,19 +2614,16 @@ apdu_get_atr (int slot, size_t *atrlen) { unsigned char *buf; - if (DBG_READER) - log_debug ("enter: apdu_get_atr: slot=%d\n", slot); - if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) { if (DBG_READER) - log_debug ("leave: apdu_get_atr => NULL (bad slot)\n"); + log_debug ("apdu_get_atr => NULL (bad slot)\n"); return NULL; } if (!reader_table[slot].atrlen) { if (DBG_READER) - log_debug ("leave: apdu_get_atr => NULL (no ATR)\n"); + log_debug ("apdu_get_atr => NULL (no ATR)\n"); return NULL; } @@ -2634,13 +2631,11 @@ apdu_get_atr (int slot, size_t *atrlen) if (!buf) { if (DBG_READER) - log_debug ("leave: apdu_get_atr => NULL (out of core)\n"); + log_debug ("apdu_get_atr => NULL (out of core)\n"); return NULL; } memcpy (buf, reader_table[slot].atr, reader_table[slot].atrlen); *atrlen = reader_table[slot].atrlen; - if (DBG_READER) - log_debug ("leave: apdu_get_atr => atrlen=%zu\n", *atrlen); return buf; } |
