aboutsummaryrefslogtreecommitdiffstats
path: root/scd/iso7816.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-06-16 18:29:47 +0000
committerWerner Koch <[email protected]>2021-06-18 15:42:38 +0000
commit44f977d0e332e77fb8a775c4837c00118bbe08cb (patch)
tree25cad289fd3f380c219d0e467a348a4e6e962808 /scd/iso7816.c
parentscd: Fix RESET handling. (diff)
downloadgnupg-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/iso7816.c')
-rw-r--r--scd/iso7816.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/iso7816.c b/scd/iso7816.c
index 30feb0707..47e16056c 100644
--- a/scd/iso7816.c
+++ b/scd/iso7816.c
@@ -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