scd: Flush the cache when writing cert data object.

* scd/app-piv.c (do_writecert): Flush the cache of the data object.

--

Suggested-by: Ingo Klöcker
GnuPG-bug-id: 5102
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-10-26 14:29:31 +09:00
parent a153d0f769
commit 8264b10d33
1 changed files with 1 additions and 0 deletions

View File

@ -3476,6 +3476,7 @@ do_writecert (app_t app, ctrl_t ctrl,
goto leave;
}
flush_cached_data (app, dobj->tag);
err = put_data (app_get_slot (app), dobj->tag,
(int)0x70, (size_t)certlen, cert,/* Certificate */
(int)0x71, (size_t)1, "", /* No compress */