1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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>
This commit is contained in:
Werner Koch 2021-06-16 20:29:47 +02:00
parent 7718244168
commit 44f977d0e3
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 10 additions and 11 deletions

View file

@ -1034,7 +1034,7 @@ iso7816_read_binary_ext (int slot, int extended_mode,
if (r_sw)
*r_sw = sw;
if (*result && sw == SW_BAD_P0_P1)
if (*result && (sw == SW_BAD_P0_P1 || sw == SW_INCORRECT_P0_P1))
{
/* Bad Parameter means that the offset is outside of the
EF. When reading all data we take this as an indication