From 499743387f4d07847a2842358bc54f9237e0c2a7 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 20 Jan 2016 11:22:44 +0100 Subject: agent: New option --pinentry-timeout * agent/gpg-agent.c (oPinentryTimeout): New. (opts): Add new option. (parse_rereadable_options): PArse that option. (main): Tell gpgconf about this option. * agent/call-pinentry.c (start_pinentry): Send option to Pinentry. * tools/gpgconf-comp.c (gc_options_gpg_agent): Add Option. -- GnuPG-bug-id: 2222 Signed-off-by: Werner Koch --- agent/call-pinentry.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'agent/call-pinentry.c') diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 33e3ec3c6..0f240866e 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -491,6 +491,18 @@ start_pinentry (ctrl_t ctrl) } } + if (opt.pinentry_timeout) + { + char *optstr; + if ((optstr = xtryasprintf ("SETTIMEOUT %lu", opt.pinentry_timeout))) + { + assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL, + NULL); + /* We ignore errors because this is just a fancy thing. */ + 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 newer pinentries and thus we do no error checking. */ -- cgit v1.2.3