From 5c2f2c935a16af93cf221a97c3001af5dff35105 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 20 Jun 2002 13:45:50 +0000 Subject: [PATCH] * rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty. --- trunk/gpgme/ChangeLog | 2 ++ trunk/gpgme/rungpg.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 5c68e9c..d9752eb 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,5 +1,7 @@ 2002-06-20 Werner Koch + * rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty. + * verify.c (calc_sig_summary): Set bad policy for wrong key usage. (skip_token): New. (_gpgme_verify_status_handler): Watch out for wrong key usage. diff --git a/trunk/gpgme/rungpg.c b/trunk/gpgme/rungpg.c index df84ee5..dcc96bf 100644 --- a/trunk/gpgme/rungpg.c +++ b/trunk/gpgme/rungpg.c @@ -577,7 +577,14 @@ build_argv (GpgObject gpg) size_t datac=0, argc=0; char **argv; 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) { -- 2.26.2