1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-11-08 11:39:57 +09:00
parent 678c819027
commit 4257cbb06c
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -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)
{