diff options
author | Werner Koch <wk@gnupg.org> | 2020-04-07 19:09:10 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-04-07 19:09:27 +0200 |
commit | f28795b615c3042f6eb7c9d941e232d0da50efbc (patch) | |
tree | ea9e7ad2ae20c4fa34cfcfb398202d8937d14adc /scd | |
parent | scd: Factor common PIN status check out. (diff) | |
download | gnupg2-f28795b615c3042f6eb7c9d941e232d0da50efbc.tar.xz gnupg2-f28795b615c3042f6eb7c9d941e232d0da50efbc.zip |
scd: Return GPG_ERR_BAD_PIN on 0x63Cn status word.
* scd/iso7816.c (map_sw): Detect 0x63Cn status code.
--
I really wonder when that got lost and we ended up with a simple card
error.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd')
-rw-r--r-- | scd/iso7816.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scd/iso7816.c b/scd/iso7816.c index 8f5ce5c52..75aa8de3d 100644 --- a/scd/iso7816.c +++ b/scd/iso7816.c @@ -94,6 +94,8 @@ map_sw (int sw) ec = GPG_ERR_GENERAL; /* Should not happen. */ else if ((sw & 0xff00) == SW_MORE_DATA) ec = 0; /* This should actually never been seen here. */ + else if ((sw & 0xfff0) == 0x63C0) + ec = GPG_ERR_BAD_PIN; else ec = GPG_ERR_CARD; } |