mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
gpg,tools: Handle GPG_ERR_PIN_BLOCKED and GPG_ERR_NO_RESET_CODE.
* g10/card-util.c (write_sc_op_status): Emit 3 and 4 in status line. * tools/card-call-scd.c (status_sc_op_failure): Likewise. -- Cherry-pick from master commit of: 64f5f7b74e428b15205f6e8ae14dec84663c3076 GnuPG-bug-id: 6425 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
4db2e13e2c
commit
d6f738729f
@ -65,6 +65,12 @@ write_sc_op_status (gpg_error_t err)
|
||||
case GPG_ERR_BAD_RESET_CODE:
|
||||
write_status_text (STATUS_SC_OP_FAILURE, "2");
|
||||
break;
|
||||
case GPG_ERR_PIN_BLOCKED:
|
||||
write_status_text (STATUS_SC_OP_FAILURE, "3");
|
||||
break;
|
||||
case GPG_ERR_NO_RESET_CODE:
|
||||
write_status_text (STATUS_SC_OP_FAILURE, "4");
|
||||
break;
|
||||
default:
|
||||
write_status (STATUS_SC_OP_FAILURE);
|
||||
break;
|
||||
|
@ -238,6 +238,12 @@ status_sc_op_failure (gpg_error_t err)
|
||||
case GPG_ERR_BAD_RESET_CODE:
|
||||
gnupg_status_printf (STATUS_SC_OP_FAILURE, "2");
|
||||
break;
|
||||
case GPG_ERR_PIN_BLOCKED:
|
||||
gnupg_status_printf (STATUS_SC_OP_FAILURE, "3");
|
||||
break;
|
||||
case GPG_ERR_NO_RESET_CODE:
|
||||
gnupg_status_printf (STATUS_SC_OP_FAILURE, "4");
|
||||
break;
|
||||
default:
|
||||
gnupg_status_printf (STATUS_SC_OP_FAILURE, NULL);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user