1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

agent: Make --pinentry-formatted-passphrase a simple flag

* agent/agent.h (opt): Change type of pinentry_formatted_passphrase
to int (as for other flags).
* agent/call-pinentry.c (setup_formatted_passphrase): Remove no longer
needed translated strings. Write option without value to Assuan
connection.
* agent/gpg-agent.c (opts): Use ARGPARSE_s_n for
oPinentryFormattedPassphrase.
(parse_rereadable_options): Set option to 1.
--

GnuPG-bug-id: 5553, 5517
This commit is contained in:
Ingo Klöcker 2021-08-12 10:47:34 +02:00
parent 0802cbb59b
commit 99601778f4
4 changed files with 8 additions and 39 deletions

View file

@ -285,7 +285,7 @@ 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 (oPinentryFormattedPassphrase, "pinentry-formatted-passphrase",
"@"),
ARGPARSE_s_n (oAllowEmacsPinentry, "allow-emacs-pinentry",
N_("allow passphrase to be prompted through Emacs")),
@ -914,7 +914,7 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread)
break;
case oPinentryTimeout: opt.pinentry_timeout = pargs->r.ret_ulong; break;
case oPinentryFormattedPassphrase:
opt.pinentry_formatted_passphrase = pargs->r.ret_ulong;
opt.pinentry_formatted_passphrase = 1;
break;
case oTpm2daemonProgram: