diff options
| author | Ingo Klöcker <[email protected]> | 2021-07-12 10:20:28 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2021-08-10 10:05:53 +0000 |
| commit | bf20a80f68449cc83b67c53ba9a0a84c45827ac4 (patch) | |
| tree | a4c0e1469cb7755d7a7e2e6a74097d910a355a77 /agent/gpg-agent.c | |
| parent | build: Simplify for string.h and getopt.h. (diff) | |
| download | gnupg-bf20a80f68449cc83b67c53ba9a0a84c45827ac4.tar.gz gnupg-bf20a80f68449cc83b67c53ba9a0a84c45827ac4.zip | |
agent: New option --pinentry-formatted-passphrase
* agent/agent.h (opt): Add field pinentry_formatted_passphrase.
* agent/call-pinentry.c (setup_formatted_passphrase): New.
(agent_get_passphrase): Pass option to pinentry.
* agent/gpg-agent.c (oPinentryFormattedPassphrase): New.
(opts): Add option.
(parse_rereadable_options): Set option.
--
GnuPG-bug-id: 5517
Diffstat (limited to 'agent/gpg-agent.c')
| -rw-r--r-- | agent/gpg-agent.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index b4ffe8e8b..edc21f4d9 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -96,6 +96,7 @@ enum cmd_and_opt_values oPinentryTouchFile, oPinentryInvisibleChar, oPinentryTimeout, + oPinentryFormattedPassphrase, oDisplay, oTTYname, oTTYtype, @@ -284,6 +285,8 @@ static gpgrt_opt_t opts[] = { ARGPARSE_s_s (oPinentryInvisibleChar, "pinentry-invisible-char", "@"), ARGPARSE_s_u (oPinentryTimeout, "pinentry-timeout", N_("|N|set the Pinentry timeout to N seconds")), + ARGPARSE_s_u (oPinentryFormattedPassphrase, "pinentry-formatted-passphrase", + "@"), ARGPARSE_s_n (oAllowEmacsPinentry, "allow-emacs-pinentry", N_("allow passphrase to be prompted through Emacs")), @@ -849,6 +852,7 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread) xfree (opt.pinentry_invisible_char); opt.pinentry_invisible_char = NULL; opt.pinentry_timeout = 0; + opt.pinentry_formatted_passphrase = 0; memset (opt.daemon_program, 0, sizeof opt.daemon_program); opt.def_cache_ttl = DEFAULT_CACHE_TTL; opt.def_cache_ttl_ssh = DEFAULT_CACHE_TTL_SSH; @@ -909,6 +913,9 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread) opt.pinentry_invisible_char = xtrystrdup (pargs->r.ret_str); break; break; case oPinentryTimeout: opt.pinentry_timeout = pargs->r.ret_ulong; break; + case oPinentryFormattedPassphrase: + opt.pinentry_formatted_passphrase = pargs->r.ret_ulong; + break; case oTpm2daemonProgram: opt.daemon_program[DAEMON_TPM2D] = pargs->r.ret_str; |
