summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-05-25 07:53:06 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2022-05-25 07:53:06 +0200
commit052f58422dca1044aba7acb4cf57416e7a8cb01f (patch)
treeee9f82b478926e8d14297947d0cd3b9cff11214e /scd
parentagent: Add missing assuan_end_confidential call. (diff)
downloadgnupg2-052f58422dca1044aba7acb4cf57416e7a8cb01f.tar.xz
gnupg2-052f58422dca1044aba7acb4cf57416e7a8cb01f.zip
agent,scd: Make sure to set CONFIDENTIAL flag in Assuan.
* agent/call-scd.c (inq_needpin): Call assuan_begin_confidential and assuan_end_confidential, and wipe the memory after use. * agent/command.c (cmd_preset_passphrase): Likewise. (cmd_put_secret): Likewise. * scd/command.c (pin_cb): Likewise. -- GnuPG-bug-id: 5977 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'scd')
-rw-r--r--scd/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scd/command.c b/scd/command.c
index e73228f3d..28fdfcb62 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -978,7 +978,9 @@ pin_cb (void *opaque, const char *info, char **retstr)
/* Fixme: Write an inquire function which returns the result in
secure memory and check all further handling of the PIN. */
+ assuan_begin_confidential (ctx);
rc = assuan_inquire (ctx, command, &value, &valuelen, MAXLEN_PIN);
+ assuan_end_confidential (ctx);
xfree (command);
if (rc)
return rc;