get a key by short subkey keyid

Peter Palfrader gnupg-devel=gnupg.org at lists.palfrader.org
Fri Jan 7 11:20:53 CET 2005


Hi,

gpg --keyserver ldap://keyserver.pgp.com/ --recv 1069EFEB
does not fetch the key that has a subkey with keyid 1069EFEB.  It does
work with long keyids tho.

Maybe this helps:

diff -ur gnupg-1.4.0/keyserver/gpgkeys_ldap.c gnupg-1.4.0-mine/keyserver/gpgkeys_ldap.c
--- gnupg-1.4.0/keyserver/gpgkeys_ldap.c	2004-10-15 12:14:02.000000000 +0200
+++ gnupg-1.4.0-mine/keyserver/gpgkeys_ldap.c	2005-01-07 11:15:44.108925212 +0100
@@ -1023,8 +1023,11 @@
   else
     {
       /* short key id */
-    
-      sprintf(search,"(pgpkeyid=%.8s)",getkey);
+
+      if(include_subkeys)
+	sprintf(search,"(|(pgpkeyid=%.8s)(pgpsubkeyid=*%.8s))",getkey,getkey);
+      else
+	sprintf(search,"(pgpkeyid=%.8s)",getkey);
     }
 
   if(verbose>2)

-- 
Peter



More information about the Gnupg-devel mailing list