aboutsummaryrefslogtreecommitdiffstats
path: root/g10/call-agent.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-11-09 04:36:12 +0000
committerNIIBE Yutaka <[email protected]>2023-11-09 04:36:12 +0000
commitec1446f9446506b5fbdf90cdeb9cbe1f410a657e (patch)
tree83e4f744133a69cb86e19985c01962ead0b117f3 /g10/call-agent.c
parentgpg,tools: Handle GPG_ERR_PIN_BLOCKED and GPG_ERR_NO_RESET_CODE. (diff)
downloadgnupg-ec1446f9446506b5fbdf90cdeb9cbe1f410a657e.tar.gz
gnupg-ec1446f9446506b5fbdf90cdeb9cbe1f410a657e.zip
gpg,sm: Set confidential in assuan communication for password.
* g10/call-agent.c (default_inq_cb): Call assuan_begin_confidential and assuan_end_confidential. * sm/call-agent.c (default_inq_cb): Likewise. -- GnuPG-bug-id: 6654 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r--g10/call-agent.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index cb7053396..c44c1cddb 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -161,6 +161,7 @@ default_inq_cb (void *opaque, const char *line)
|| has_leading_keyword (line, "NEW_PASSPHRASE"))
&& opt.pinentry_mode == PINENTRY_MODE_LOOPBACK)
{
+ assuan_begin_confidential (parm->ctx);
if (have_static_passphrase ())
{
s = get_static_passphrase ();
@@ -187,6 +188,7 @@ default_inq_cb (void *opaque, const char *line)
err = assuan_send_data (parm->ctx, pw, strlen (pw));
xfree (pw);
}
+ assuan_end_confidential (parm->ctx);
}
else if ((s = has_leading_keyword (line, "CONFIRM"))
&& opt.pinentry_mode == PINENTRY_MODE_LOOPBACK