* gpgkeys_ldap.c (get_key): The deduping code requires "pgpcertid", but
authorDavid Shaw <dshaw@jabberwocky.com>
Thu, 14 Nov 2002 14:30:53 +0000 (14:30 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Thu, 14 Nov 2002 14:30:53 +0000 (14:30 +0000)
that was not available when running without verbose on.  Noted by Stefan.

keyserver/ChangeLog
keyserver/gpgkeys_ldap.c

index edf380a..5133414 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-14  David Shaw  <dshaw@jabberwocky.com>
+
+       * gpgkeys_ldap.c (get_key): The deduping code requires
+       "pgpcertid", but that was not available when running without
+       verbose on.  Noted by Stefan.
+
 2002-11-10  David Shaw  <dshaw@jabberwocky.com>
 
        * gpgkeys_ldap.c (get_key): Fix typo in deduping code.
index eb1ec0d..96df485 100644 (file)
@@ -272,7 +272,10 @@ get_key(char *getkey)
   int ret=KEYSERVER_INTERNAL_ERROR,err,count;
   struct keylist *dupelist=NULL;
   char search[62];
-  char *attrs[]={"replaceme","pgpuserid","pgpkeyid","pgpcertid","pgprevoked",
+  /* This ordering is significant - specifically, "pgpcertid" needs to
+     be the second item in the list, since everything after it may be
+     discarded if the user isn't in verbose mode. */
+  char *attrs[]={"replaceme","pgpcertid","pgpuserid","pgpkeyid","pgprevoked",
                 "pgpdisabled","pgpkeycreatetime","modifytimestamp",
                 "pgpkeysize","pgpkeytype",NULL};
   attrs[0]=pgpkeystr; /* Some compilers don't like using variables as
@@ -331,7 +334,7 @@ get_key(char *getkey)
     fprintf(console,"gpgkeys: LDAP fetch for: %s\n",search);
 
   if(!verbose)
-    attrs[1]=NULL;
+    attrs[2]=NULL; /* keep only pgpkey(v2) and pgpcertid */
 
   if(verbose)
     fprintf(console,"gpgkeys: requesting key 0x%s from ldap://%s%s%s\n",