我想从Linux(Linux 3.2.0-4-amd64#1 SMP Debian 3.2.51-1 x86_64 GNU/Linux)客户端到Windows 2012服务器建立安全的ldap连接(ldaps),以更改活动中的用户密码目录,通过PHP.为此,我在服务器上创建了一个自签名证书(使用Windows Server Manager),但是当我尝试连接时,我收到以下错误(通过打开调试选项:)
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
:
ldap_create ldap_url_parse_ext(ldaps://xxx.xxx.xxx.xxx) ldap_bind_s ldap_simple_bind_s ldap_sasl_bind_s ldap_sasl_bind ldap_send_initial_request ldap_new_connection 1 1 0 ldap_int_open_connection ldap_connect_to_host: TCP xxx.xxx.xxx.xxx:636 ldap_new_socket: 3 ldap_prepare_socket: 3 ldap_connect_to_host: Trying xxx.xxx.xxx.xxx:636 ldap_pvt_connect: fd: 3 tm: -1 async: 0 TLS: peer cert untrusted or revoked (0x42) TLS: can't connect: (unknown error code). ldap_err2string PHP Warning: ldap_bind(): Unable to bind to server
似乎客户端无法信任证书,因为它是自签名的.
我应采取哪些步骤来建立安全连接?客户端证书存储在/etc/ssl/certs/ca-certificates.crt