aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2020-09-16 04:13:29 +0000
committerNIIBE Yutaka <[email protected]>2020-09-16 04:13:29 +0000
commit8ff36630277f05fbe4e43c7d757eb90da8645e3f (patch)
tree90b9a12ff2cfa51af801955dcae5a938fcaddf47
parentscd: Clear caching PIN at KDF setup. (diff)
downloadgnupg-8ff36630277f05fbe4e43c7d757eb90da8645e3f.tar.gz
gnupg-8ff36630277f05fbe4e43c7d757eb90da8645e3f.zip
scd: Clear PIN cache when changing key attributes.
* scd/app-openpgp.c (change_keyattr): Clear all PINs. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--scd/app-openpgp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 3d96467bf..465819adc 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -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;
}