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
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_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)