mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
scd: Add option --clear to PASSWD.
* scd/command.c (cmd_passwd): Add option --clear.
(send_status_printf): New.
* scd/app-common.h (APP_CHANGE_FLAG_CLEAR): New.
* scd/app-nks.c (do_change_pin): Return an error if that option is
used.
* scd/app-openpgp.c (do_change_pin): Ditto.
--
Card application may support this option to clear the PIN verification
status of a specific PIN.
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 29929e6552
)
This commit is contained in:
parent
9309175de8
commit
d4082ff430
7 changed files with 46 additions and 6 deletions
|
@ -2584,10 +2584,14 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr,
|
|||
int pinlen = 0;
|
||||
|
||||
(void)ctrl;
|
||||
|
||||
memset (&pininfo, 0, sizeof pininfo);
|
||||
pininfo.fixedlen = -1;
|
||||
pininfo.minlen = minlen;
|
||||
|
||||
if ((flags & APP_CHANGE_FLAG_CLEAR))
|
||||
return gpg_error (GPG_ERR_UNSUPPORTED_OPERATION);
|
||||
|
||||
if (reset_mode && chvno == 3)
|
||||
{
|
||||
rc = gpg_error (GPG_ERR_INV_ID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue