aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-02-17 17:21:07 +0000
committerWerner Koch <[email protected]>2004-02-17 17:21:07 +0000
commit81edc1e40ecb73c83d983fbf63b012559d063ad9 (patch)
treec862e3369aeac7a3f3371dc6cedcf5ec9f22fae5
parentMore samples (diff)
downloadgnupg-81edc1e40ecb73c83d983fbf63b012559d063ad9.tar.gz
gnupg-81edc1e40ecb73c83d983fbf63b012559d063ad9.zip
* gpgsm.c: Fixed value parsing for --with-validation.
* call-agent.c (start_agent): Ignore an empty GPG_AGENT_INFO. * call-dirmngr.c (start_dirmngr): Likewise for DIRMNGR_INFO.
Diffstat (limited to '')
-rw-r--r--sm/ChangeLog4
-rw-r--r--sm/call-agent.c4
-rw-r--r--sm/call-dirmngr.c2
-rw-r--r--sm/server.c3
4 files changed, 9 insertions, 4 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog
index aa6e46bc2..2f46e1e4d 100644
--- a/sm/ChangeLog
+++ b/sm/ChangeLog
@@ -1,5 +1,9 @@
2004-02-17 Werner Koch <[email protected]>
+ * gpgsm.c: Fixed value parsing for --with-validation.
+ * call-agent.c (start_agent): Ignore an empty GPG_AGENT_INFO.
+ * call-dirmngr.c (start_dirmngr): Likewise for DIRMNGR_INFO.
+
* gpgsm.c: New option --with-md5-fingerprint.
* keylist.c (list_cert_std): Print MD5 fpr.
diff --git a/sm/call-agent.c b/sm/call-agent.c
index 30a1b6480..a0a1da5c3 100644
--- a/sm/call-agent.c
+++ b/sm/call-agent.c
@@ -78,10 +78,10 @@ start_agent (void)
if (agent_ctx)
return 0; /* fixme: We need a context for each thread or serialize
the access to the agent (which is suitable given that
- the agent is not MT */
+ the agent is not MT. */
infostr = force_pipe_server? NULL : getenv ("GPG_AGENT_INFO");
- if (!infostr)
+ if (!infostr || !*infostr)
{
const char *pgmname;
const char *argv[3];
diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
index 05f7bd10d..ba96df499 100644
--- a/sm/call-dirmngr.c
+++ b/sm/call-dirmngr.c
@@ -142,7 +142,7 @@ start_dirmngr (void)
the access to the dirmngr */
infostr = force_pipe_server? NULL : getenv ("DIRMNGR_INFO");
- if (!infostr)
+ if (!infostr || !*infostr)
{
const char *pgmname;
const char *argv[3];
diff --git a/sm/server.c b/sm/server.c
index 54b220d14..8cc1b900e 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -172,7 +172,8 @@ option_handler (ASSUAN_CONTEXT ctx, const char *key, const char *value)
}
else if (!strcmp (key, "with-validation"))
{
- ctrl->with_validation = !!*value;
+ int i = *value? atoi (value) : 0;
+ ctrl->with_validation = i;
}
else
return ASSUAN_Invalid_Option;