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

scd: Clear PIN cache when changing key attributes.

* scd/app-openpgp.c (change_keyattr): Clear all PINs.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-09-16 13:13:29 +09:00
parent f4c07fc3d3
commit 8ff3663027

View File

@ -3767,7 +3767,7 @@ build_ecc_privkey_template (app_t app, int keyno,
}
/* Helper for do_writekley to change the size of a key. Not ethat
/* Helper for do_writekey to change the size of a key. Not ethat
this deletes the entire key without asking. */
static gpg_error_t
change_keyattr (app_t app, ctrl_t ctrl,
@ -3796,6 +3796,9 @@ change_keyattr (app_t app, ctrl_t ctrl,
app->did_chv1 = 0;
app->did_chv2 = 0;
app->did_chv3 = 0;
cache_pin (app, ctrl, 1, NULL);
cache_pin (app, ctrl, 2, NULL);
cache_pin (app, ctrl, 3, NULL);
return err;
}