1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* ksutil.h, ksutil.c (parse_ks_options): New keyserver-option exact-name.

The last of exact-name and exact-email overrides the earlier.

* gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Use it here to
do a name-only search.
This commit is contained in:
David Shaw 2005-08-18 21:14:16 +00:00
parent 2d353af65d
commit 70bf6d9204
5 changed files with 49 additions and 5 deletions

View file

@ -1158,6 +1158,9 @@ ldap_quote(char *buffer,const char *string)
}
}
if(buffer)
*buffer='\0';
return count;
}
@ -1173,7 +1176,7 @@ search_key(char *searchkey)
/* The maximum size of the search, including the optional stuff and
the trailing \0 */
char *expanded_search;
char search[2+12+1+MAX_LINE+1+2+15+14+1+1];
char search[2+12+1+1+MAX_LINE+1+2+2+15+14+1+1];
char *attrs[]={"pgpcertid","pgpuserid","pgprevoked","pgpdisabled",
"pgpkeycreatetime","pgpkeyexpiretime","modifytimestamp",
"pgpkeysize","pgpkeytype",NULL};
@ -1192,11 +1195,13 @@ search_key(char *searchkey)
/* Build the search string */
sprintf(search,"%s(pgpuserid=*%s%s%s*)%s%s%s",
sprintf(search,"%s(pgpuserid=%s%s%s%s%s*)%s%s%s",
(!(opt->flags.include_disabled&&opt->flags.include_revoked))?"(&":"",
opt->flags.exact_name?"":"*",
opt->flags.exact_email?"<":"",
expanded_search,
opt->flags.exact_email?">":"",
opt->flags.exact_name?" <":"",
opt->flags.include_disabled?"":"(pgpdisabled=0)",
opt->flags.include_revoked?"":"(pgprevoked=0)",
!(opt->flags.include_disabled&&opt->flags.include_revoked)?")":"");