]> git.sur5r.net Git - openldap/commit
ITS#6975 MozNSS - allow cacertdir in most cases
authorRich Megginson <rmeggins@redhat.com>
Tue, 21 Jun 2011 00:28:48 +0000 (18:28 -0600)
committerHoward Chu <hyc@openldap.org>
Tue, 21 Jun 2011 22:56:55 +0000 (15:56 -0700)
commitd78cf81648b9766c9e7fe0e72ae7749aeec9951b
tree58724545c4fe053cb5a8f70b355149cde2d53574
parentae24a1a6ac91f5313de91618abe03683798035fe
ITS#6975 MozNSS - allow cacertdir in most cases

OpenLDAP built with OpenSSL allows most any value of cacertdir - directory
is a file, directory does not contain any CA certs, directory does not
exist - users expect if they specify TLS_REQCERT=never, no matter what
the TLS_CACERTDIR setting is, TLS/SSL will just work.
TLS_CACERT, on the other hand, is a hard error.  Even if TLS_REQCERT=never,
if TLS_CACERT is specified and is not a valid CA cert file, TLS/SSL will
fail.  This patch makes CACERT errors hard errors, and makes CACERTDIR
errors "soft" errors.  The code checks CACERT first and, even though
the function will return an error, checks CACERTDIR anyway so that if the
user sets TRACE mode they will get CACERTDIR processing messages.
libraries/libldap/tls_m.c