* rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty.

This commit is contained in:
Werner Koch 2002-06-20 13:45:50 +00:00
parent 45d99504f5
commit 1211f36b15
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2002-06-20 Werner Koch <wk@gnupg.org> 2002-06-20 Werner Koch <wk@gnupg.org>
* rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty.
* verify.c (calc_sig_summary): Set bad policy for wrong key usage. * verify.c (calc_sig_summary): Set bad policy for wrong key usage.
(skip_token): New. (skip_token): New.
(_gpgme_verify_status_handler): Watch out for wrong key usage. (_gpgme_verify_status_handler): Watch out for wrong key usage.

View File

@ -577,7 +577,14 @@ build_argv (GpgObject gpg)
size_t datac=0, argc=0; size_t datac=0, argc=0;
char **argv; char **argv;
int need_special = 0; int need_special = 0;
int use_agent = !!getenv ("GPG_AGENT_INFO"); int use_agent = 0;
char *p;
/* We don't want to use the agent with a malformed environment
variable. This is only a very basic test but sufficient to make
our life in the regression tests easier. */
p = getenv ("GPG_AGENT_INFO");
use_agent = (p && strchr (p, ':'));
if (gpg->argv) if (gpg->argv)
{ {