[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: bad certificate error.



Are you sure the certificate file is readable by slapd? Have you tried using
the OpenSSL s_client or s_server with your cert to make sure it's correct?

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Kervin L.
> Pierre

> I'm trying to setup TLS to be used with a simple auth.
>
> I keep getting "alert: bad certificate error" with 2.0.23 and also with
> CVS.  I've tried everything I could find in the mail archives but
> nothing seems to work.  I'm on Redhat 7.2 and I use
> make -C /usr/share/ssl/certs/ slapd.pem
> to generate the certificate.  I tried the openssl command from the
> LDAPv3 howto as well.
>
> On the client side ( ldapsearch ) the error is either "local error (82)"
> or "cannot connect (91)".
>
> Does anyone know what the problem can be?  I generated my cert with the
> fully qualified domain name of the server.
>
> The server command was
> ./slapd -d 4095 -h "ldap:/// ldaps://ldapxxx.eng.fit.edu" -f
> ../etc/openldap/slapd.conf
>
> And the ldapsearch command was
> ldapsearch -x -d 4095 -H ldaps://ldapxxx.eng.fit.edu/ -b
> 'dc=my-domain,dc=com' -ZZ '(objectclass=*)'
>
>  From the ldapsearch
> ...
> TLS trace: SSL3 alert write:warning:bad certificate
> TLS: unable to get peer certificate.
> ldap_perror
> ldap_start_tls: Can't contact LDAP server (81)
>
>  From the server
> ...
> TLS trace: SSL3 alert read:warning:bad certificate
> tls_read: want=5, got=0
>
> ldap_read: want=1, got=0
>
> ber_get_next on fd 10 failed errno=0 (Success)
> ...
>
> Any clues?
>
> Thanks
> --Kervin