[git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-118-gd2a9794

by Werner Koch cvs at cvs.gnupg.org
Thu Nov 24 16:42:41 CET 2011


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  d2a979452e541183cae7e6e04634b5bbdab9c9d7 (commit)
      from  725d3589ada10266e4350f56a4f89e4d82b4dc16 (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 d2a979452e541183cae7e6e04634b5bbdab9c9d7
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 24 15:48:24 2011 +0100

    Make HKP kyeserver engine work again.
    
    We had some debug code here which prevented it from working.
    The host selection code still needs a review!
    
    	* ks-engine-http.c (ks_http_help): Do not print help for hkp.
    	* ks-engine-hkp.c (ks_hkp_help): Print help only for hkp.
    	(send_request): Remove test code.
    	(map_host): Use xtrymalloc.
    
    	* certcache.c (classify_pattern): Remove unused variable and make
    	explicit substring search work.

diff --git a/dirmngr/ChangeLog b/dirmngr/ChangeLog
index a06558c..0968b41 100644
--- a/dirmngr/ChangeLog
+++ b/dirmngr/ChangeLog
@@ -1,3 +1,13 @@
+2011-11-24  Werner Koch  <wk at g10code.com>
+
+	* ks-engine-http.c (ks_http_help): Do not print help for hkp.
+	* ks-engine-hkp.c (ks_hkp_help): Print help only for hkp.
+	(send_request): Remove test code.
+	(map_host): Use xtrymalloc.
+
+	* certcache.c (classify_pattern): Remove unused variable and make
+	explicit substring search work.
+
 2011-06-01  Marcus Brinkmann  <mb at g10code.com>
 
 	* Makefile.am (dirmngr_ldap_CFLAGS): Add $(LIBGCRYPT_CFLAGS),
diff --git a/dirmngr/certcache.c b/dirmngr/certcache.c
index 3ada60d..a8b84e6 100644
--- a/dirmngr/certcache.c
+++ b/dirmngr/certcache.c
@@ -681,11 +681,10 @@ get_cert_bysubject (const char *subject_dn, unsigned int seq)
 static enum pattern_class
 classify_pattern (const char *pattern, size_t *r_offset, size_t *r_sn_offset)
 {
-  enum pattern_class result = PATTERN_UNKNOWN;
+  enum pattern_class result;
   const char *s;
   int hexprefix = 0;
   int hexlength;
-  int mode = 0;
 
   *r_offset = *r_sn_offset = 0;
 
@@ -718,7 +717,7 @@ classify_pattern (const char *pattern, size_t *r_offset, size_t *r_sn_offset)
       break;
 
     case '*':  /* Case insensitive substring search.  */
-      mode = PATTERN_SUBSTR;
+      result = PATTERN_SUBSTR;
       s++;
       break;
 
diff --git a/dirmngr/ks-action.c b/dirmngr/ks-action.c
index 14de4d6..9ebf69b 100644
--- a/dirmngr/ks-action.c
+++ b/dirmngr/ks-action.c
@@ -87,7 +87,7 @@ ks_action_help (ctrl_t ctrl, const char *url)
 
   if (!parsed_uri)
     ks_print_help (ctrl,
-                   "(Use the schema followed by a colon for specific help.)");
+                   "(Use an URL for engine specific help.)");
   else
     http_release_parsed_uri (parsed_uri);
   return err;
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index d4a1211..98187ab 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -209,7 +209,7 @@ map_host (const char *name)
       int refidx;
 
       reftblsize = 100;
-      reftbl = xmalloc (reftblsize * sizeof *reftbl);
+      reftbl = xtrymalloc (reftblsize * sizeof *reftbl);
       if (!reftbl)
         return NULL;
       refidx = 0;
@@ -280,7 +280,7 @@ map_host (const char *name)
                       else
                         {
                           if (ai->ai_family == AF_INET)
-                        hosttable[tmpidx]->v4 = 1;
+                            hosttable[tmpidx]->v4 = 1;
                           if (ai->ai_family == AF_INET6)
                             hosttable[tmpidx]->v6 = 1;
 
@@ -409,7 +409,7 @@ ks_hkp_help (ctrl_t ctrl, parsed_uri_t uri)
 
   if (!uri)
     err = ks_print_help (ctrl, "  hkp");
-  else if (uri->is_http)
+  else if (uri->is_http && !strcmp (uri->scheme, "hkp"))
     err = ks_print_help (ctrl, data);
   else
     err = 0;
@@ -472,7 +472,7 @@ send_request (ctrl_t ctrl, const char *request, const char *hostportstr,
   char *request_buffer = NULL;
 
   *r_fp = NULL;
-  return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
  once_more:
   err = http_open (&http,
                    post_cb? HTTP_REQ_POST : HTTP_REQ_GET,
diff --git a/dirmngr/ks-engine-http.c b/dirmngr/ks-engine-http.c
index 2ce1b19..b0e2e14 100644
--- a/dirmngr/ks-engine-http.c
+++ b/dirmngr/ks-engine-http.c
@@ -43,7 +43,7 @@ ks_http_help (ctrl_t ctrl, parsed_uri_t uri)
 
   if (!uri)
     err = ks_print_help (ctrl, "  http");
-  else if (uri->is_http)
+  else if (uri->is_http && strcmp (uri->scheme, "hkp"))
     err = ks_print_help (ctrl, data);
   else
     err = 0;
diff --git a/dirmngr/ldap.c b/dirmngr/ldap.c
index 87121fd..638348b 100644
--- a/dirmngr/ldap.c
+++ b/dirmngr/ldap.c
@@ -666,7 +666,7 @@ fetch_next_cert_ldap (cert_fetch_context_t context,
   char *p, *pend;
   int n;
   int okay = 0;
-  int is_cms = 0;
+  /* int is_cms = 0; */
 
   *value = NULL;
   *valuelen = 0;
@@ -758,7 +758,7 @@ fetch_next_cert_ldap (cert_fetch_context_t context,
             {
               p = context->tmpbuf;
               p[n] = 0; /*(we allocated one extra byte for this.)*/
-              is_cms = 0;
+              /* fixme: is_cms = 0; */
               if ( (pend = strchr (p, ';')) )
                 *pend = 0; /* Strip off the extension. */
               if (!ascii_strcasecmp (p, USERCERTIFICATE))

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

Summary of changes:
 dirmngr/ChangeLog        |   10 ++++++++++
 dirmngr/certcache.c      |    5 ++---
 dirmngr/ks-action.c      |    2 +-
 dirmngr/ks-engine-hkp.c  |    8 ++++----
 dirmngr/ks-engine-http.c |    2 +-
 dirmngr/ldap.c           |    4 ++--
 6 files changed, 20 insertions(+), 11 deletions(-)


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




More information about the Gnupg-commits mailing list