diff options
author | Werner Koch <[email protected]> | 2020-04-07 17:09:10 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-04-15 13:38:13 +0000 |
commit | 9e6a3290dad1b19144a2b413902e9918094a2cea (patch) | |
tree | 813b1b773d88ba4ef87313e3717b1925299e8e5c | |
parent | scd: Factor common PIN status check out. (diff) | |
download | gnupg-9e6a3290dad1b19144a2b413902e9918094a2cea.tar.gz gnupg-9e6a3290dad1b19144a2b413902e9918094a2cea.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 <[email protected]>
Backported from master.
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | scd/iso7816.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in index 15f7485e1..bd90a6c80 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -79,6 +79,7 @@ g10/verify.c kbx/kbxutil.c +scd/app-p15.c scd/app-nks.c scd/app-openpgp.c scd/app-dinsig.c diff --git a/scd/iso7816.c b/scd/iso7816.c index bb07911cc..092a119a6 100644 --- a/scd/iso7816.c +++ b/scd/iso7816.c @@ -103,6 +103,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; } |