mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg,gpgsm: Hide password in debug output also for asked passwords.
* g10/call-agent.c (agent_get_passphrase): Call assuan_begin_confidential and assuan_end_confidential. * sm/call-agent.c (gpgsm_agent_ask_passphrase): Ditto. -- GnuPG-bug-id: 6654 The drawback of this solution is that we don't see any IPC lines from the assuan_transact. Everything else would require larger changes to libassuan.
This commit is contained in:
parent
e6cedba119
commit
def8f5f3d2
2 changed files with 10 additions and 1 deletions
|
@ -1322,6 +1322,7 @@ gpgsm_agent_ask_passphrase (ctrl_t ctrl, const char *desc_msg, int repeat,
|
|||
char *arg4 = NULL;
|
||||
membuf_t data;
|
||||
struct default_inq_parm_s inq_parm;
|
||||
int wasconf;
|
||||
|
||||
*r_passphrase = NULL;
|
||||
|
||||
|
@ -1340,9 +1341,13 @@ gpgsm_agent_ask_passphrase (ctrl_t ctrl, const char *desc_msg, int repeat,
|
|||
xfree (arg4);
|
||||
|
||||
init_membuf_secure (&data, 64);
|
||||
wasconf = assuan_get_flag (agent_ctx, ASSUAN_CONFIDENTIAL);
|
||||
assuan_begin_confidential (agent_ctx);
|
||||
err = assuan_transact (agent_ctx, line,
|
||||
put_membuf_cb, &data,
|
||||
default_inq_cb, &inq_parm, NULL, NULL);
|
||||
if (!wasconf)
|
||||
assuan_end_confidential (agent_ctx);
|
||||
|
||||
if (err)
|
||||
xfree (get_membuf (&data, NULL));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue