Browse Source

Ticket #430 - server to server ssl client auth broken with latest openldap

https://fedorahosted.org/389/ticket/430
Resolves: Ticket #430
Bug Description: server to server ssl client auth broken with latest openldap
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Pass in the openldap certfile as "tokenname:certnickname"
for the internal token as well as for external tokens.  openldap 2.4.32 and
later are patched to accept this, and will force the use of the token named
tokenname as the slot/token to use.  If the internal one has already been
unlocked (i.e. by the server doing SSL server init) then the cert can be used
without having to unlock the key/cert db again.
Platforms tested: RHEL6 x86_64, Fedora 17
Flag Day: no
Doc impact: no
Rich Megginson 13 years ago
parent
commit
53c974f363
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ldap/servers/slapd/ssl.c

+ 5 - 0
ldap/servers/slapd/ssl.c

@@ -1348,7 +1348,12 @@ slapd_SSL_client_auth (LDAP* ld)
 			 			 * the personality for internal tokens.
 			 			 */
 						token = slapi_ch_strdup(internalTokenName);
+#if defined(USE_OPENLDAP)
+						/* openldap needs tokenname:certnick */
+						PR_snprintf(cert_name, sizeof(cert_name), "%s:%s", token, personality);
+#else
 						PL_strncpyz(cert_name, personality, sizeof(cert_name));
+#endif
 						slapi_ch_free((void **) &ssltoken);
 			  } else {
 						/* external PKCS #11 token - attach token name */