Niels Olson
January 5th, 2009, 06:48 PM
Hello,
I'm working on an app server running Ubuntu 8.10 and we need secure ldap. Problem is the ldap client doesn't trust the ldap server's certificate because it believes the issuer of the certificate is unknown. But it is a very common CA: Equifax Secure Certificate Authority. I checked, and the Equifax Secure Certificate Authority pem file is loaded in /etc/ssl/certs. I fetched the cert and installed it again and ran c_rehash just to make sure.
Here's where I'm at in terms of debugging
mail /etc/ldap: ldapsearch -x -d5 -H ldaps://myldap.server.com
ldap_url_parse_ext(ldaps://myldap.server.com)
ldap_create
ldap_url_parse_ext(ldaps://myldap.server.com:636/??base)
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP myldap.server.com:636
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 11.22.33.44:636
ldap_pvt_connect: fd: 3 tm: -1 async: 0
TLS: warning: cacertdir not implemented for gnutls
TLS: peer cert untrusted or revoked (0x42)
ldap_err2string
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
and here's gnutls-cli
mail /etc/ldap: gnutls-cli --print-cert -p 636 ldap.server.com
Resolving 'ldap.server.com'...
Connecting to '11.22.33.44:636'...
- Certificate type: X.509
- Got a certificate list of 1 certificates.
- Certificate[0] info:
-----BEGIN CERTIFICATE-----
blah blah
-----END CERTIFICATE-----
# The hostname in the certificate matches 'ldap.server.com'.
# valid since:
# expires at:
# fingerprint:
# Subject's DN: C=US,ST=xxxx,L=xxxx,O=xxxx,OU=xxxx,CN=ldap.server. com
# Issuer's DN: C=US,O=Equifax,OU=Equifax Secure Certificate Authority
- Peer's certificate issuer is unknown
- Peer's certificate is NOT trusted
- Version: TLS1.0
- Key Exchange: RSA
- Cipher: ARCFOUR-128
- MAC: MD5
- Compression: NULL
- Handshake was completed
If you caught the "cacertdir not implemented for gnutls", yes, I did have a tls_cacertdir specified in my ldap.conf, but when I take that out, I still get all the other errors. That seems to be irrelevant to the issue at hand.
I'm working on an app server running Ubuntu 8.10 and we need secure ldap. Problem is the ldap client doesn't trust the ldap server's certificate because it believes the issuer of the certificate is unknown. But it is a very common CA: Equifax Secure Certificate Authority. I checked, and the Equifax Secure Certificate Authority pem file is loaded in /etc/ssl/certs. I fetched the cert and installed it again and ran c_rehash just to make sure.
Here's where I'm at in terms of debugging
mail /etc/ldap: ldapsearch -x -d5 -H ldaps://myldap.server.com
ldap_url_parse_ext(ldaps://myldap.server.com)
ldap_create
ldap_url_parse_ext(ldaps://myldap.server.com:636/??base)
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP myldap.server.com:636
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 11.22.33.44:636
ldap_pvt_connect: fd: 3 tm: -1 async: 0
TLS: warning: cacertdir not implemented for gnutls
TLS: peer cert untrusted or revoked (0x42)
ldap_err2string
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
and here's gnutls-cli
mail /etc/ldap: gnutls-cli --print-cert -p 636 ldap.server.com
Resolving 'ldap.server.com'...
Connecting to '11.22.33.44:636'...
- Certificate type: X.509
- Got a certificate list of 1 certificates.
- Certificate[0] info:
-----BEGIN CERTIFICATE-----
blah blah
-----END CERTIFICATE-----
# The hostname in the certificate matches 'ldap.server.com'.
# valid since:
# expires at:
# fingerprint:
# Subject's DN: C=US,ST=xxxx,L=xxxx,O=xxxx,OU=xxxx,CN=ldap.server. com
# Issuer's DN: C=US,O=Equifax,OU=Equifax Secure Certificate Authority
- Peer's certificate issuer is unknown
- Peer's certificate is NOT trusted
- Version: TLS1.0
- Key Exchange: RSA
- Cipher: ARCFOUR-128
- MAC: MD5
- Compression: NULL
- Handshake was completed
If you caught the "cacertdir not implemented for gnutls", yes, I did have a tls_cacertdir specified in my ldap.conf, but when I take that out, I still get all the other errors. That seems to be irrelevant to the issue at hand.