aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2020-02-28 07:25:15 +0000
committerNIIBE Yutaka <[email protected]>2020-02-28 07:25:15 +0000
commit19f70b5072b2ef80759ced83fe0dac9cf4dde830 (patch)
tree10fd8e7586563439356775579af394153f80fab0 /scd/app-openpgp.c
parentscd: Improve setattr for KDF. (diff)
downloadgnupg-19f70b5072b2ef80759ced83fe0dac9cf4dde830.tar.gz
gnupg-19f70b5072b2ef80759ced83fe0dac9cf4dde830.zip
scd: Fix the previous commit.
* scd/app-openpgp.c (do_setattr): Flush the KDF DO just before setting. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 634e5e354..8f47b8a8f 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -2818,6 +2818,9 @@ do_setattr (app_t app, ctrl_t ctrl, const char *name,
if (!rc)
rc = iso7816_put_data (app_get_slot (app), 0, 0xD3, NULL, 0);
+ /* Flush the cache again, because pin2hash_if_kdf uses the DO. */
+ flush_cache_item (app, 0xF9);
+
wipe_and_free (buffer1, bufferlen1);
wipe_and_free_string (oldpinvalue);
}