[git] GnuPG - branch, master, updated. gnupg-2.1.2-75-gd0ff2ee

by Neal H. Walfield cvs at cvs.gnupg.org
Tue Mar 31 14:51:07 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  d0ff2ee04187fbedacbe4d3884ee75d957a0b8c6 (commit)
       via  802eec0ca49b92104c92f18c9a6a04c34de74168 (commit)
       via  6d5aee23c341a2e9196617975662ccc735050b72 (commit)
       via  7f6d7948c1e56e09c1bdaa5143e1b5558c4376dd (commit)
       via  44297d0821dbc2330b1f91351aaab8f6925dc032 (commit)
       via  348c520040a31f5c322183c0654a34978e2baf6f (commit)
      from  f26ba14028d34845ae10aae552b90681907e377d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d0ff2ee04187fbedacbe4d3884ee75d957a0b8c6
Author: Neal H. Walfield <neal at g10code.com>
Date:   Tue Mar 31 14:48:31 2015 +0200

    dirmngr: Don't use alloca.
    
    * dirmngr/ks-engine-ldap.c (ks_ldap_put): Replace use of alloca with
    xmalloc and xfree.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c
index 66e4964..1ce709d 100644
--- a/dirmngr/ks-engine-ldap.c
+++ b/dirmngr/ks-engine-ldap.c
@@ -1961,7 +1961,7 @@ ks_ldap_put (ctrl_t ctrl, parsed_uri_t uri,
 	/* The last line is not \n terminated!  Make a copy so we can
 	   add a NUL terminator.  */
 	{
-	  temp = alloca (infolen + 1);
+	  temp = xmalloc (infolen + 1);
 	  memcpy (temp, info, infolen);
 	  info = temp;
 	  newline = (char *) info + infolen;
@@ -1978,7 +1978,10 @@ ks_ldap_put (ctrl_t ctrl, parsed_uri_t uri,
       if (! temp)
 	assert ((char *) info + infolen - 1 == infoend);
       else
-	assert (infolen == -1);
+	{
+	  assert (infolen == -1);
+	  xfree (temp);
+	}
     }
 
   modlist_add (&addlist, "objectClass", "pgpKeyInfo");

commit 802eec0ca49b92104c92f18c9a6a04c34de74168
Author: Neal H. Walfield <neal at g10code.com>
Date:   Tue Mar 31 14:23:13 2015 +0200

    dirmngr: Simplify truncation of long strings in debug code.
    
    * dirmngr/ks-engine-ldap.c (modlist_dump): Simplify truncation of long
    strings.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c
index 236f923..66e4964 100644
--- a/dirmngr/ks-engine-ldap.c
+++ b/dirmngr/ks-engine-ldap.c
@@ -1440,29 +1440,22 @@ modlist_dump (LDAPMod **modlist, estream_t output)
 
 	  for ((ptr = (*m)->mod_values), (i = 1); ptr && *ptr; ptr++, i ++)
 	    {
-	      /* At most about 10 lines.  */
+	      /* Assuming terminals are about 80 characters wide,
+		 display at most most about 10 lines of debugging
+		 output.  If we do trim the buffer, append '...' to
+		 the end.  */
 	      const int max_len = 10 * 70;
 	      size_t value_len = strlen (*ptr);
-	      char buffer[max_len + 4];
-	      char *temp;
-	      int elided = 0;
-	      if (value_len > max_len)
-		{
-		  temp = buffer;
-		  memcpy (temp, *ptr, max_len);
-		  temp[max_len] = temp[max_len + 1] = temp[max_len + 2] = '.';
-		  temp[max_len + 3] = 0;
-		  elided = 1;
-		}
-	      else
-		temp = *ptr;
+	      int elide = value_len > max_len;
 
 	      if (multi)
 		es_fprintf (output, "    %d. ", i);
-	      es_fprintf (output, "`%s'", temp);
-	      if (elided)
-		es_fprintf (output, " (%zd bytes elided)",
+	      es_fprintf (output, "`%.*s", max_len, *ptr);
+	      if (elide)
+		es_fprintf (output, "...' (%zd bytes elided)",
 			    value_len - max_len);
+	      else
+		es_fprintf (output, "'");
 	      es_fprintf (output, "\n");
 	    }
 	}

commit 6d5aee23c341a2e9196617975662ccc735050b72
Author: Neal H. Walfield <neal at g10code.com>
Date:   Tue Mar 31 12:26:59 2015 +0200

    dirmngr: Correct indentation.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c
index bf56d35..236f923 100644
--- a/dirmngr/ks-engine-ldap.c
+++ b/dirmngr/ks-engine-ldap.c
@@ -1123,118 +1123,117 @@ ks_ldap_search (ctrl_t ctrl, parsed_uri_t uri, const char *pattern,
 
 		es_fprintf (fp, "pub:%s:",certid[0]);
 
-		  vals = ldap_get_values (ldap_conn, each, "pgpkeytype");
-		  if (vals)
-		    {
-		      /* The LDAP server doesn't exactly handle this
-			 well. */
-		      if (strcasecmp (vals[0], "RSA") == 0)
-			es_fputs ("1", fp);
-		      else if (strcasecmp (vals[0], "DSS/DH") == 0)
-			es_fputs ("17", fp);
-		      ldap_value_free (vals);
-		    }
-
-		  es_fputc (':', fp);
-
-		  vals = ldap_get_values (ldap_conn, each, "pgpkeysize");
-		  if (vals)
-		    {
-		      /* Not sure why, but some keys are listed with a
-			 key size of 0.  Treat that like an
-			 unknown. */
-		      if (atoi (vals[0]) > 0)
-			es_fprintf (fp, "%d", atoi (vals[0]));
-		      ldap_value_free (vals);
-		    }
-
-		  es_fputc (':', fp);
-
-		  /* YYYYMMDDHHmmssZ */
-
-		  vals = ldap_get_values (ldap_conn, each, "pgpkeycreatetime");
-		  if(vals && strlen (vals[0]) == 15)
-		    {
-		      es_fprintf (fp, "%u",
-				  (unsigned int) ldap2epochtime(vals[0]));
-		      ldap_value_free (vals);
-		    }
-
-		  es_fputc (':', fp);
-
-		  vals = ldap_get_values (ldap_conn, each, "pgpkeyexpiretime");
-		  if (vals && strlen (vals[0]) == 15)
-		    {
-		      es_fprintf (fp, "%u",
-				  (unsigned int) ldap2epochtime (vals[0]));
-		      ldap_value_free (vals);
-		    }
-
-		  es_fputc (':', fp);
-
-		  vals = ldap_get_values (ldap_conn, each, "pgprevoked");
-		  if (vals)
-		    {
-		      if (atoi (vals[0]) == 1)
-			es_fprintf (fp, "r");
-		      ldap_value_free (vals);
-		    }
-
-		  vals = ldap_get_values (ldap_conn, each, "pgpdisabled");
-		  if (vals)
-		    {
-		      if (atoi (vals[0]) ==1)
-			es_fprintf (fp, "d");
-		      ldap_value_free (vals);
-		    }
+		vals = ldap_get_values (ldap_conn, each, "pgpkeytype");
+		if (vals)
+		  {
+		    /* The LDAP server doesn't exactly handle this
+		       well. */
+		    if (strcasecmp (vals[0], "RSA") == 0)
+		      es_fputs ("1", fp);
+		    else if (strcasecmp (vals[0], "DSS/DH") == 0)
+		      es_fputs ("17", fp);
+		    ldap_value_free (vals);
+		  }
+
+		es_fputc (':', fp);
+
+		vals = ldap_get_values (ldap_conn, each, "pgpkeysize");
+		if (vals)
+		  {
+		    /* Not sure why, but some keys are listed with a
+		       key size of 0.  Treat that like an unknown. */
+		    if (atoi (vals[0]) > 0)
+		      es_fprintf (fp, "%d", atoi (vals[0]));
+		    ldap_value_free (vals);
+		  }
+
+		es_fputc (':', fp);
+
+		/* YYYYMMDDHHmmssZ */
+
+		vals = ldap_get_values (ldap_conn, each, "pgpkeycreatetime");
+		if(vals && strlen (vals[0]) == 15)
+		  {
+		    es_fprintf (fp, "%u",
+				(unsigned int) ldap2epochtime(vals[0]));
+		    ldap_value_free (vals);
+		  }
+
+		es_fputc (':', fp);
+
+		vals = ldap_get_values (ldap_conn, each, "pgpkeyexpiretime");
+		if (vals && strlen (vals[0]) == 15)
+		  {
+		    es_fprintf (fp, "%u",
+				(unsigned int) ldap2epochtime (vals[0]));
+		    ldap_value_free (vals);
+		  }
+
+		es_fputc (':', fp);
+
+		vals = ldap_get_values (ldap_conn, each, "pgprevoked");
+		if (vals)
+		  {
+		    if (atoi (vals[0]) == 1)
+		      es_fprintf (fp, "r");
+		    ldap_value_free (vals);
+		  }
+
+		vals = ldap_get_values (ldap_conn, each, "pgpdisabled");
+		if (vals)
+		  {
+		    if (atoi (vals[0]) ==1)
+		      es_fprintf (fp, "d");
+		    ldap_value_free (vals);
+		  }
 
 #if 0
-		  /* This is not yet specified in the keyserver
-		     protocol, but may be someday. */
-		  es_fputc (':', fp);
-
-		  vals = ldap_get_values (ldap_conn, each, "modifytimestamp");
-		  if(vals && strlen (vals[0]) == 15)
-		    {
-		      es_fprintf (fp, "%u",
-				  (unsigned int) ldap2epochtime (vals[0]));
-		      ldap_value_free (vals);
-		    }
+		/* This is not yet specified in the keyserver
+		   protocol, but may be someday. */
+		es_fputc (':', fp);
+
+		vals = ldap_get_values (ldap_conn, each, "modifytimestamp");
+		if(vals && strlen (vals[0]) == 15)
+		  {
+		    es_fprintf (fp, "%u",
+				(unsigned int) ldap2epochtime (vals[0]));
+		    ldap_value_free (vals);
+		  }
 #endif
 
-		  es_fprintf (fp, "\n");
-
-		  /* Now print all the uids that have this certid */
-		  for (uids = ldap_first_entry (ldap_conn, res);
-		       uids;
-		       uids = ldap_next_entry (ldap_conn, uids))
-		    {
-		      vals = ldap_get_values (ldap_conn, uids, "pgpcertid");
-		      if (! vals)
-			continue;
-
-		      if (strcasecmp (certid[0], vals[0]) == 0)
-			{
-			  char **uidvals;
-
-			  es_fprintf (fp, "uid:");
-
-			  uidvals = ldap_get_values (ldap_conn,
-						     uids, "pgpuserid");
-			  if (uidvals)
-			    {
-			      /* Need to escape any colons */
-			      char *quoted = percent_escape (uidvals[0], NULL);
-			      es_fputs (quoted, fp);
-			      xfree (quoted);
-			      ldap_value_free (uidvals);
-			    }
-
-			  es_fprintf (fp, "\n");
-			}
-
-		      ldap_value_free(vals);
-		    }
+		es_fprintf (fp, "\n");
+
+		/* Now print all the uids that have this certid */
+		for (uids = ldap_first_entry (ldap_conn, res);
+		     uids;
+		     uids = ldap_next_entry (ldap_conn, uids))
+		  {
+		    vals = ldap_get_values (ldap_conn, uids, "pgpcertid");
+		    if (! vals)
+		      continue;
+
+		    if (strcasecmp (certid[0], vals[0]) == 0)
+		      {
+			char **uidvals;
+
+			es_fprintf (fp, "uid:");
+
+			uidvals = ldap_get_values (ldap_conn,
+						   uids, "pgpuserid");
+			if (uidvals)
+			  {
+			    /* Need to escape any colons */
+			    char *quoted = percent_escape (uidvals[0], NULL);
+			    es_fputs (quoted, fp);
+			    xfree (quoted);
+			    ldap_value_free (uidvals);
+			  }
+
+			es_fprintf (fp, "\n");
+		      }
+
+		    ldap_value_free(vals);
+		  }
 	      }
 
 	      ldap_value_free (certid);

commit 7f6d7948c1e56e09c1bdaa5143e1b5558c4376dd
Author: Neal H. Walfield <neal at g10code.com>
Date:   Tue Mar 31 12:07:39 2015 +0200

    dirmngr: Use a better error code.
    
    * dirmngr/ldap-parse-uri.c (ldap_parse_uri): On error, return
    GPG_ERR_GENERAL, not GPG_ERR_ASS_GENERAL.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/dirmngr/ldap-parse-uri.c b/dirmngr/ldap-parse-uri.c
index 9a6d619..62f8f6d 100644
--- a/dirmngr/ldap-parse-uri.c
+++ b/dirmngr/ldap-parse-uri.c
@@ -94,7 +94,7 @@ ldap_parse_uri (parsed_uri_t *purip, const char *uri)
   if (result != 0)
     {
       log_error ("Unable to parse LDAP uri '%s'\n", uri);
-      err = GPG_ERR_ASS_GENERAL;
+      err = GPG_ERR_GENERAL;
       goto out;
     }
 

commit 44297d0821dbc2330b1f91351aaab8f6925dc032
Author: Neal H. Walfield <neal at g10code.com>
Date:   Tue Mar 31 12:00:58 2015 +0200

    gpg: Remove gratuitous extern qualifier from declaration.
    
    --
    
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/common/http.h b/common/http.h
index 17f778d..fcab12a 100644
--- a/common/http.h
+++ b/common/http.h
@@ -62,7 +62,7 @@ struct parsed_uri_s
 };
 typedef struct parsed_uri_s *parsed_uri_t;
 
-extern struct uri_tuple_s *uri_query_lookup (parsed_uri_t uri, const char *key);
+struct uri_tuple_s *uri_query_lookup (parsed_uri_t uri, const char *key);
 
 typedef enum
   {

commit 348c520040a31f5c322183c0654a34978e2baf6f
Author: Neal H. Walfield <neal at g10code.com>
Date:   Sat Mar 28 17:23:56 2015 +0100

    dirmngr: Better encapsulate the keyservers variable.
    
    * dirmngr/dirmngr.h (struct server_control_s): Move field keyservers
    from here...
    * dirmngr/server.c (struct server_local_s): ... to here.  Update
    users.
    * dirmngr/ks-action.h (ks_action_resolve): Add argument keyservers.
    (ks_action_search): Likewise.
    (ks_action_get): Likewise.
    (ks_action_put): Likewise.
    * dirmngr/ks-action.c (ks_action_resolve): Add argument keyservers.
    Use it instead of ctrl->keyservers.
    (ks_action_search): Likewise.
    (ks_action_get): Likewise.
    (ks_action_put): Likewise.
    
    --
    
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/dirmngr/dirmngr.h b/dirmngr/dirmngr.h
index 3dd16a3..320d178 100644
--- a/dirmngr/dirmngr.h
+++ b/dirmngr/dirmngr.h
@@ -1,6 +1,6 @@
 /* dirmngr.h - Common definitions for the dirmngr
  * Copyright (C) 2002 Klarälvdalens Datakonsult AB
- * Copyright (C) 2004 g10 Code GmbH
+ * Copyright (C) 2004, 2015 g10 Code GmbH
  * Copyright (C) 2014 Werner Koch
  *
  * This file is part of GnuPG.
@@ -174,7 +174,6 @@ struct server_control_s
                             response. */
 
   int audit_events;  /* Send audit events to client.  */
-  uri_item_t keyservers; /* List of keyservers.  */
 };
 
 
diff --git a/dirmngr/ks-action.c b/dirmngr/ks-action.c
index 6cfb598..c76aaaa 100644
--- a/dirmngr/ks-action.c
+++ b/dirmngr/ks-action.c
@@ -1,7 +1,7 @@
 /* ks-action.c - OpenPGP keyserver actions
  * Copyright (C) 2011 Free Software Foundation, Inc.
  * Copyright (C) 2011, 2014 Werner Koch
- * Copyright (C) 2015  g10 Code GmbH
+ * Copyright (C) 2015 g10 Code GmbH
  *
  * This file is part of GnuPG.
  *
@@ -105,13 +105,13 @@ ks_action_help (ctrl_t ctrl, const char *url)
 /* Resolve all host names.  This is useful for looking at the status
    of configured keyservers.  */
 gpg_error_t
-ks_action_resolve (ctrl_t ctrl)
+ks_action_resolve (ctrl_t ctrl, uri_item_t keyservers)
 {
   gpg_error_t err = 0;
   int any_server = 0;
   uri_item_t uri;
 
-  for (uri = ctrl->keyservers; !err && uri; uri = uri->next)
+  for (uri = keyservers; !err && uri; uri = uri->next)
     {
       if (uri->parsed_uri->is_http)
         {
@@ -131,7 +131,8 @@ ks_action_resolve (ctrl_t ctrl)
 /* Search all configured keyservers for keys matching PATTERNS and
    write the result to the provided output stream.  */
 gpg_error_t
-ks_action_search (ctrl_t ctrl, strlist_t patterns, estream_t outfp)
+ks_action_search (ctrl_t ctrl, uri_item_t keyservers,
+		  strlist_t patterns, estream_t outfp)
 {
   gpg_error_t err = 0;
   int any_server = 0;
@@ -147,7 +148,7 @@ ks_action_search (ctrl_t ctrl, strlist_t patterns, estream_t outfp)
      errors - it might not be the best idea to ignore an error from
      one server and silently continue with another server.  For now we
      stop at the first error. */
-  for (uri = ctrl->keyservers; !err && uri; uri = uri->next)
+  for (uri = keyservers; !err && uri; uri = uri->next)
     {
       int is_http = uri->parsed_uri->is_http;
       int is_ldap = (strcmp (uri->parsed_uri->scheme, "ldap") == 0
@@ -179,7 +180,8 @@ ks_action_search (ctrl_t ctrl, strlist_t patterns, estream_t outfp)
 /* Get the requested keys (matching PATTERNS) using all configured
    keyservers and write the result to the provided output stream.  */
 gpg_error_t
-ks_action_get (ctrl_t ctrl, strlist_t patterns, estream_t outfp)
+ks_action_get (ctrl_t ctrl, uri_item_t keyservers,
+	       strlist_t patterns, estream_t outfp)
 {
   gpg_error_t err = 0;
   gpg_error_t first_err = 0;
@@ -198,7 +200,7 @@ ks_action_get (ctrl_t ctrl, strlist_t patterns, estream_t outfp)
      keyservers might not all be fully synced thus it is not clear
      whether the first keyserver has the freshest copy of the key.
      Need to think about a better strategy.  */
-  for (uri = ctrl->keyservers; !err && uri; uri = uri->next)
+  for (uri = keyservers; !err && uri; uri = uri->next)
     {
       int is_http = uri->parsed_uri->is_http;
       int is_ldap = (strcmp (uri->parsed_uri->scheme, "ldap") == 0
@@ -311,7 +313,8 @@ ks_action_fetch (ctrl_t ctrl, const char *url, estream_t outfp)
    KEYID; done'.  This function may modify DATA and INFO.  If this is
    a problem, then the caller should create a copy.  */
 gpg_error_t
-ks_action_put (ctrl_t ctrl, void *data, size_t datalen,
+ks_action_put (ctrl_t ctrl, uri_item_t keyservers,
+	       void *data, size_t datalen,
 	       void *info, size_t infolen)
 {
   gpg_error_t err = 0;
@@ -319,7 +322,7 @@ ks_action_put (ctrl_t ctrl, void *data, size_t datalen,
   int any_server = 0;
   uri_item_t uri;
 
-  for (uri = ctrl->keyservers; !err && uri; uri = uri->next)
+  for (uri = keyservers; !err && uri; uri = uri->next)
     {
       int is_http = uri->parsed_uri->is_http;
       int is_ldap = (strcmp (uri->parsed_uri->scheme, "ldap") == 0
diff --git a/dirmngr/ks-action.h b/dirmngr/ks-action.h
index 2def3dc..c373bf9 100644
--- a/dirmngr/ks-action.h
+++ b/dirmngr/ks-action.h
@@ -22,11 +22,14 @@
 #define DIRMNGR_KS_ACTION_H 1
 
 gpg_error_t ks_action_help (ctrl_t ctrl, const char *url);
-gpg_error_t ks_action_resolve (ctrl_t ctrl);
-gpg_error_t ks_action_search (ctrl_t ctrl, strlist_t patterns, estream_t outfp);
-gpg_error_t ks_action_get (ctrl_t ctrl, strlist_t patterns, estream_t outfp);
+gpg_error_t ks_action_resolve (ctrl_t ctrl, uri_item_t keyservers);
+gpg_error_t ks_action_search (ctrl_t ctrl, uri_item_t keyservers,
+			      strlist_t patterns, estream_t outfp);
+gpg_error_t ks_action_get (ctrl_t ctrl, uri_item_t keyservers,
+			   strlist_t patterns, estream_t outfp);
 gpg_error_t ks_action_fetch (ctrl_t ctrl, const char *url, estream_t outfp);
-gpg_error_t ks_action_put (ctrl_t ctrl, void *data, size_t datalen,
+gpg_error_t ks_action_put (ctrl_t ctrl, uri_item_t keyservers,
+			   void *data, size_t datalen,
 			   void *info, size_t infolen);
 
 
diff --git a/dirmngr/server.c b/dirmngr/server.c
index deae85c..506b137 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -1,8 +1,7 @@
 /* server.c - LDAP and Keyserver access server
  * Copyright (C) 2002 Klarälvdalens Datakonsult AB
- * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2011 g10 Code GmbH
+ * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2011, 2015 g10 Code GmbH
  * Copyright (C) 2014 Werner Koch
- * Copyright (C) 2015  g10 Code GmbH
  *
  * This file is part of GnuPG.
  *
@@ -76,6 +75,9 @@ struct server_local_s
   /* Per-session LDAP servers.  */
   ldap_server_t ldapservers;
 
+  /* Per-session list of keyservers.  */
+  uri_item_t keyservers;
+
   /* If this flag is set to true this dirmngr process will be
      terminated after the end of this session.  */
   int stopme;
@@ -113,12 +115,15 @@ get_ldapservers_from_ctrl (ctrl_t ctrl)
 void
 release_ctrl_keyservers (ctrl_t ctrl)
 {
-  while (ctrl->keyservers)
+  if (! ctrl->server_local)
+    return;
+
+  while (ctrl->server_local->keyservers)
     {
-      uri_item_t tmp = ctrl->keyservers->next;
-      http_release_parsed_uri (ctrl->keyservers->parsed_uri);
-      xfree (ctrl->keyservers);
-      ctrl->keyservers = tmp;
+      uri_item_t tmp = ctrl->server_local->keyservers->next;
+      http_release_parsed_uri (ctrl->server_local->keyservers->parsed_uri);
+      xfree (ctrl->server_local->keyservers);
+      ctrl->server_local->keyservers = tmp;
     }
 }
 
@@ -127,7 +132,6 @@ release_ctrl_keyservers (ctrl_t ctrl)
 /* Helper to print a message while leaving a command.  */
 static gpg_error_t
 leave_cmd (assuan_context_t ctx, gpg_error_t err)
-
 {
   if (err)
     {
@@ -1476,7 +1480,7 @@ cmd_keyserver (assuan_context_t ctx, char *line)
 
   if (resolve_flag)
     {
-      err = ks_action_resolve (ctrl);
+      err = ks_action_resolve (ctrl, ctrl->server_local->keyservers);
       if (err)
         goto leave;
     }
@@ -1540,15 +1544,15 @@ cmd_keyserver (assuan_context_t ctx, char *line)
     release_ctrl_keyservers (ctrl);
   if (add_flag)
     {
-      item->next = ctrl->keyservers;
-      ctrl->keyservers = item;
+      item->next = ctrl->server_local->keyservers;
+      ctrl->server_local->keyservers = item;
     }
 
   if (!add_flag && !clear_flag && !help_flag) /* List configured keyservers.  */
     {
       uri_item_t u;
 
-      for (u=ctrl->keyservers; u; u = u->next)
+      for (u=ctrl->server_local->keyservers; u; u = u->next)
         dirmngr_status (ctrl, "KEYSERVER", u->uri, NULL);
     }
   err = 0;
@@ -1606,7 +1610,8 @@ cmd_ks_search (assuan_context_t ctx, char *line)
     err = set_error (GPG_ERR_ASS_GENERAL, "error setting up a data stream");
   else
     {
-      err = ks_action_search (ctrl, list, outfp);
+      err = ks_action_search (ctrl, ctrl->server_local->keyservers,
+			      list, outfp);
       es_fclose (outfp);
     }
 
@@ -1667,7 +1672,7 @@ cmd_ks_get (assuan_context_t ctx, char *line)
     err = set_error (GPG_ERR_ASS_GENERAL, "error setting up a data stream");
   else
     {
-      err = ks_action_get (ctrl, list, outfp);
+      err = ks_action_get (ctrl, ctrl->server_local->keyservers, list, outfp);
       es_fclose (outfp);
     }
 
@@ -1762,7 +1767,8 @@ cmd_ks_put (assuan_context_t ctx, char *line)
     }
 
   /* Send the key.  */
-  err = ks_action_put (ctrl, value, valuelen, info, infolen);
+  err = ks_action_put (ctrl, ctrl->server_local->keyservers,
+		       value, valuelen, info, infolen);
 
  leave:
   xfree (info);

-----------------------------------------------------------------------

Summary of changes:
 common/http.h            |   2 +-
 dirmngr/dirmngr.h        |   3 +-
 dirmngr/ks-action.c      |  21 ++--
 dirmngr/ks-action.h      |  11 ++-
 dirmngr/ks-engine-ldap.c | 249 +++++++++++++++++++++++------------------------
 dirmngr/ldap-parse-uri.c |   2 +-
 dirmngr/server.c         |  36 ++++---
 7 files changed, 165 insertions(+), 159 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list