diff options
author | NIIBE Yutaka <[email protected]> | 2023-11-08 02:39:57 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-11-08 02:49:27 +0000 |
commit | 4257cbb06c8e091e834e989064612f94aa879239 (patch) | |
tree | 3b66ff8b79de57ff97108f8c75d66bb03c3c31a1 | |
parent | w32: Use utf8 for the asctimestamp function. (diff) | |
download | gnupg-4257cbb06c8e091e834e989064612f94aa879239.tar.gz gnupg-4257cbb06c8e091e834e989064612f94aa879239.zip |
scd: Return GPG_ERR_PIN_BLOCKED when it's blocked.
* scd/app-openpgp.c (build_enter_admin_pin_prompt): Fix to use
GPG_ERR_PIN_BLOCKED.
(check_pin): Likewise.
--
Cherry-pick from master commit:
e6b3d53db36dba8aef640fc0a99cc079551a965a
GnuPG-bug-id: 6425
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | scd/app-openpgp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index fd9ce554c..014cd9395 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -2859,7 +2859,7 @@ build_enter_admin_pin_prompt (app_t app, char **r_prompt, int *r_remaining) if (!remaining) { log_info (_("card is permanently locked!\n")); - return gpg_error (GPG_ERR_BAD_PIN); + return gpg_error (GPG_ERR_PIN_BLOCKED); } log_info (ngettext("%d Admin PIN attempt remaining before card" @@ -5998,7 +5998,7 @@ do_check_pin (app_t app, ctrl_t ctrl, const char *keyidstr, if (!count) { log_info (_("card is permanently locked!\n")); - return gpg_error (GPG_ERR_BAD_PIN); + return gpg_error (GPG_ERR_PIN_BLOCKED); } else if (count < 3) { |