mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-31 11:41:32 +01:00
dirmngr: Support gpgMailbox for mode MAILSUB and MAILEND.
* dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Use gpgMailbox if server supports this.
This commit is contained in:
parent
1b2ac21c4c
commit
acabbc0078
@ -223,13 +223,19 @@ keyspec_to_ldap_filter (const char *keyspec, char **filter, int only_exact,
|
||||
break;
|
||||
|
||||
case KEYDB_SEARCH_MODE_MAILSUB:
|
||||
if (! only_exact)
|
||||
if ((serverinfo & SERVERINFO_SCHEMAV2))
|
||||
f = xasprintf("(&(gpgMailbox=*%s*)(!(|(pgpRevoked=1)(pgpDisabled=1))))",
|
||||
(freeme = ldap_escape_filter (desc.u.name)));
|
||||
else if (!only_exact)
|
||||
f = xasprintf ("(pgpUserID=*<*%s*>*)",
|
||||
(freeme = ldap_escape_filter (desc.u.name)));
|
||||
break;
|
||||
|
||||
case KEYDB_SEARCH_MODE_MAILEND:
|
||||
if (! only_exact)
|
||||
if ((serverinfo & SERVERINFO_SCHEMAV2))
|
||||
f = xasprintf("(&(gpgMailbox=*%s)(!(|(pgpRevoked=1)(pgpDisabled=1))))",
|
||||
(freeme = ldap_escape_filter (desc.u.name)));
|
||||
else if (!only_exact)
|
||||
f = xasprintf ("(pgpUserID=*<*%s>*)",
|
||||
(freeme = ldap_escape_filter (desc.u.name)));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user