diff options
author | Werner Koch <[email protected]> | 2015-09-16 19:24:14 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-09-16 19:24:14 +0000 |
commit | 93d257c81952cbb08a744a9cea6749639aa32cd7 (patch) | |
tree | a76f3307c6f5d0bd773ca950bc83329d3724a73c /agent/call-pinentry.c | |
parent | g13: Move some code to a separate module. (diff) | |
download | gnupg-93d257c81952cbb08a744a9cea6749639aa32cd7.tar.gz gnupg-93d257c81952cbb08a744a9cea6749639aa32cd7.zip |
agent: New option --pinentry-invisible-char.
* agent/gpg-agent.c (oPinentryInvisibleChar): New.
(opts): Add option.
(parse_rereadable_options): Set option.
* agent/agent.h (opt): Add field pinentry_invisible_char.
* agent/call-pinentry.c (start_pinentry): Pass option to pinentry.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/call-pinentry.c')
-rw-r--r-- | agent/call-pinentry.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index f584ee0ae..9845a0358 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -475,6 +475,21 @@ start_pinentry (ctrl_t ctrl) } } + /* Tell the pinentry that we would prefer that the given character + is used as the invisible character by the entry widget. */ + if (opt.pinentry_invisible_char) + { + char *optstr; + if ((optstr = xtryasprintf ("OPTION invisible-char=%s", + opt.pinentry_invisible_char))) + { + assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL, + NULL); + /* We ignore errors because this is just a fancy thing and + older pinentries do not support this feature. */ + xfree (optstr); + } + } /* Tell the pinentry the name of a file it shall touch after having messed with the tty. This is optional and only supported by |