尝试建立与我的Novel eDirectory 8.8服务器的ldaps连接时,有时我必须放入TLS_REQCERT never
客户端服务器ldap.conf文件。显然,这是一个坏主意。
我运行的命令是这样的,它具有实际起作用的凭据...
ldapsearch -x -H ldaps://ldapserver -b 'ou=active,ou=people,dc=example,dc=org' -D 'cn=admin,dc=example,dc=org' -W "cn=username"
在Ubuntu 13.10上,它可以正常工作。
在SLES上可以正常工作。
在CentOS 6.5上,它返回:
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
现在,我导入的证书是从DigiCert购买的通配符证书。我的同事发现了一些报告,表明某些系统存在通配符问题。
那么,通配符证书应归咎于此吗?如果是这样,我该如何解决?
如果不是通配符证书,那是什么?
按照安德鲁·舒尔曼的建议,我添加-d1
了我的ldapsearch命令。我最终得到的是:
ldap_url_parse_ext(ldaps://ldap.example.org)
ldap_create
ldap_url_parse_ext(ldaps://ldap.example.org:636/??base)
Enter LDAP Password:
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP ldap.example.org:636
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 10.225.0.24:636
ldap_pvt_connect: fd: 3 tm: -1 async: 0
TLS: certdb config: configDir='/etc/openldap' tokenDescription='ldap(0)' certPrefix='cacerts' keyPrefix='cacerts' flags=readOnly
TLS: cannot open certdb '/etc/openldap', error -8018:Unknown PKCS #11 error.
TLS: could not get info about the CA certificate directory /etc/openldap/cacerts - error -5950:File not found.
TLS: certificate [CN=DigiCert High Assurance EV Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US] is not valid - error -8172:Peer's certificate issuer has been marked as not trusted by the user..
TLS: error: connect - force handshake failure: errno 2 - moznss error -8172
TLS: can't connect: TLS error -8172:Peer's certificate issuer has been marked as not trusted by the user..
ldap_err2string
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
话虽如此,CentOS不信任DigiCert?还是CentOS没有受信任的发行者列表?
telnet ldapserver ldaps
或openssl s_client -connect ldapserver:636
。