From 2087f6a793354b912566b0e2a69a219f9ac5d260 Mon Sep 17 00:00:00 2001 From: William Brown Date: Mar 03 2017 22:42:37 +0000 Subject: Ticket 4 - Cert detection breaks some tests Bug Description: Certdetection attempts to open a connection and read cn=config in cases when we aren't able to access the attributes. It's not worth it :( Fix Description: Disable the detection. https://pagure.io/lib389/issue/4 Author: wibrown Review by: spichugi (Thanks!) --- diff --git a/lib389/__init__.py b/lib389/__init__.py index 14ea6ee..ecd9936 100644 --- a/lib389/__init__.py +++ b/lib389/__init__.py @@ -1024,15 +1024,16 @@ class DirSrv(SimpleLDAPObject, object): else: super(DirSrv, self).__init__(uri, trace_level=TRACE_LEVEL) + #if certdir is None and self.isLocal and self.nss_ssl._rsa_ca_exists(): + # certdir = self.get_cert_dir() + # log.debug("Using dirsrv ca certificate %s" % certdir) + if certdir is not None: """ We have a certificate directory, so lets start up TLS negotiations """ self.set_option(ldap.OPT_X_TLS_CACERTDIR, certdir) log.debug("Using external ca certificate %s" % certdir) - else: - self.set_option(ldap.OPT_X_TLS_CACERTDIR, self.get_cert_dir()) - log.debug("Using dirsrv ca certificate %s" % certdir) if certdir or starttls: try: diff --git a/lib389/instance/setup.py b/lib389/instance/setup.py index c18f419..0907aab 100644 --- a/lib389/instance/setup.py +++ b/lib389/instance/setup.py @@ -260,6 +260,7 @@ class SetupDs(object): self._secure_password = password_hash(self._raw_secure_password, bin_dir=slapd['bin_dir']) if self.verbose: + self.log.info("INFO: temp root password set to %s" % self._raw_secure_password) self.log.info("PASSED: root user checking") assert(slapd['port'] is not None)