title: OpenLDAP: Connection fails on Mac
body: <p>On my Mac, I've installed OpenLDAP, modified /etc/openldap/ldap.conf and specified the path to the cert. However, I keep getting this error:</p>
  
  <pre><code>SERVER_DOWN: {
      'info': 
      'error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:
       routines:SSL3_GET_SERVER_CERTIFICATE:
          certificate verify failed (unable to get local issuer certificate)', 
      'desc': "Can't contact LDAP server"
  }
  </code></pre>
  
  <p>The ldap.conf has in it:</p>
  
  <pre><code>TLS_REQCERT demand
  TLS_CACERT /etc/openldap/CA_tncdc01.cer
  </code></pre>
  
  <p>And the cer is there:</p>
  
  <pre><code>$ ll /etc/openldap/CA_tncdc01.cer
  -rw-r--r--@ 1 eric  staff  1298 Jun 23 09:12 /etc/openldap/CA_tncdc01.cer
  </code></pre>
  
  <p>OpenSSL verify says:</p>
  
  <pre><code>$ openssl verify /etc/openldap/CA_tncdc01.cer 
  error 18 at 0 depth lookup:self signed certificate
  OK
  </code></pre>
  
  <p>And to bind, I use (Python):</p>
  
  <pre><code>url = "ldaps://[snip]:636"
  l = ldap.initialize(url)
  l.simple_bind_s(bind_name, bind_password)
  </code></pre>
  
  <p>All seems to be in order.</p>
  
  <p>Thanks
  Eric</p>