我有一個 openldap 主伺服器和 2 個 openldap 從伺服器。使用非自簽名 CA。
openldap master:基於stretch
slapd 2.4.44+dfsg-5+d amd64
openssl 1.1.0f-3+deb9u1 amd64命名debian
openldap Slave:基於stretch
slapd 2.4.44+dfsg-5+d amd64
openssl 1.1.0f-3+deb9u1 amd64命名debian1
openldap master:基於名稱 ldap o oracle linux 7.4
slapd 2.4.44-5.el7.x86_64
openssl-1.0.2k-8.0.1.el7.x86_64
基於oracle linux的openldap客戶端無法連線到基於debian strech的ldap master。
我在slave debian 和slave oracle linux 上做過的事情:
root@debian1:~# openssl verify -CAfile /etc/ssl/contatogs.com.br/cacert.pem /etc/ssl/contatogs.com.br/newcerts/cn\=debian1\,ou\=computers\,dc\=contatogs\,dc\=com\,dc\=br.crt.pem
/etc/ssl/contatogs.com.br/newcerts/cn=debian1,ou=computers,dc=contatogs,dc=com,dc=br.crt.pem: **OK**
[root@ldap ~]# openssl verify -CAfile /etc/openldap/cacerts/cacert.pem /etc/openldap/certs/cn\=ldap\,ou\=>
/etc/openldap/certs/cn=ldap,ou=computers,dc=contatogs,dc=com,dc=br.crt.pem: **OK**
到目前為止還不錯 80)
現在 debian1 從站可能出現問題:
root@debian1:~# openssl s_client -connect debian.contatogs.com.br:389 -CAfile /etc/ssl/contatogs.com.br/cac
ert.pem -state
CONNECTED(00000003)
SSL_connect:before SSL initialization
SSL_connect:SSLv3/TLS write client hello
**SSL_connect:error in SSLv3/TLS write client hello**
write:errno=0
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 176 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1519415735
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
但儘管有此錯誤/警告,僅使用 debian/debian 的主/從仍可工作。
現在oracle linux根本就不能用了…
[root@ldap ~]#
<contatogs.com.br:389 -CAfile /etc/openldap/cacerts/cacert.pem -state
CONNECTED(00000003)
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
139967037114272:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 289 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
Start Time: 1519415876
Timeout : 300 (sec)
Verify return code: 0 (ok)
我幾乎可以肯定問題是 CA,但我不知道如何修復...80)
任何幫助將不勝感激。
答案1
您好,對於未來的搜索,我已經找到了消除此錯誤的正確方法。當我為從站建立憑證時,我使用客戶端部分(TLS Web 用戶端)創建,正確的做法是建立一個憑證作為伺服器(TLS Web 伺服器)。幫助我發現此錯誤的是 serverfault 上的另一篇文章,其中包含此命令: openssl verify - Purpose sslserver -CAfile cacert.pem ldaprov1.crt