* gpgkeys_hkp.c (search_key): HKP keyservers like the 0x to be present
authorDavid Shaw <dshaw@jabberwocky.com>
Sun, 3 Dec 2006 06:04:58 +0000 (06:04 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sun, 3 Dec 2006 06:04:58 +0000 (06:04 +0000)
when searching by keyID.

keyserver/ChangeLog
keyserver/gpgkeys_hkp.c

index 2a1b959..3511889 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-03  David Shaw  <dshaw@jabberwocky.com>
+
+       * gpgkeys_hkp.c (search_key): HKP keyservers like the 0x to be
+       present when searching by keyID.
+
 2006-11-22  Werner Koch  <wk@g10code.com>
 
        * Makefile.am (gpg2keys_ldap_LDADD): Add jnlib.  This is needed
index 19c96ba..e393b85 100644 (file)
@@ -426,6 +426,12 @@ search_key(const char *searchkey)
     strcat(request,"11371");
   strcat(request,opt->path);
   append_path(request,"/pks/lookup?op=index&options=mr&search=");
+
+  /* HKP keyservers like the 0x to be present when searching by
+     keyid */
+  if(search_type==KS_SEARCH_KEYID_SHORT || search_type==KS_SEARCH_KEYID_LONG)
+    strcat(request,"0x");
+
   strcat(request,searchkey_encoded);
 
   if(search_type!=KS_SEARCH_SUBSTR)