aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-12-14 14:15:17 +0000
committerWerner Koch <[email protected]>2020-12-17 09:23:46 +0000
commite47de853820000ddf383e7b790fbc435e3378d66 (patch)
treed16c24e3f7d01925882d65ea975f148f97b805ab
parentscd:ccid: Call libusb_clear_halt in ccid_vendor_specific_setup. (diff)
downloadgnupg-e47de853820000ddf383e7b790fbc435e3378d66.tar.gz
gnupg-e47de853820000ddf383e7b790fbc435e3378d66.zip
dirmngr: Fix adding keys to an LDAP server.
* dirmngr/ks-engine-ldap.c (ks_ldap_put): Extract attribites into addlist. -- The code used the wrong list which resulting in adding attributes marked for deletion. In particular Active Directory does not accept such an data and rejects them. The bug was introduced into 2.1 while porting the code from the old keyserver helpers to dirmngr. Fixes-commit: 51341badb623927f2a358588c725a356fc77dbe7 Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--dirmngr/ks-engine-ldap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c
index d94bd5e25..ba3313164 100644
--- a/dirmngr/ks-engine-ldap.c
+++ b/dirmngr/ks-engine-ldap.c
@@ -1995,7 +1995,7 @@ ks_ldap_put (ctrl_t ctrl, parsed_uri_t uri,
*newline = '\0';
- extract_attributes (&modlist, info);
+ extract_attributes (&addlist, info);
infolen = infolen - ((uintptr_t) newline - (uintptr_t) info + 1);
info = newline + 1;
@@ -2042,7 +2042,7 @@ ks_ldap_put (ctrl_t ctrl, parsed_uri_t uri,
char **certid;
char *dn;
- certid = modlist_lookup (modlist, "pgpCertID");
+ certid = modlist_lookup (addlist, "pgpCertID");
if (/* We should have a value. */
! certid
/* Exactly one. */