我已经在 上设置了 LDAP 服务器localhost
并使用 生成了证书CN=localhost
。但是当我运行命令时
ldapsearch -H ldap://localhost -D "..." -w password -ZZ -d1
我收到错误
...
TLS: hostname (sithViewcy) does not match common name in certificate (localhost).
ldap_err2string
ldap_start_tls: Connect error (-11)
additional info: TLS: hostname does not match CN in peer certificate
...
“sithViewcy”在我的 /etc/hostname 中
证书没问题
openssl x509 -in /etc/ssl/certs/avi9526.guest_ldap.crt -noout -text | grep CN=
:
Issuer: C=..., ST=..., L=..., O=..., OU=CA, CN=avi9526.guest
Subject: C=..., ST=.., L=.., O=..., OU=LDAP, CN=localhost
为什么客户端尝试通过 LDAP/etc/hostname
而不是提供的名称进行连接localhost
?