openldap 中的 TLS 設定問題

openldap 中的 TLS 設定問題

我使用 TLS 配置了 openldap,但是當我嘗試使用以下命令測試它時,我收到錯誤訊息:

$ openssl s_client -connect localhost:389 -showcerts
CONNECTED(00000005)
14041704935568: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 320 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

我在此命令中添加 -tls ption 但我的輸出是

no peer certificate available
---
No client certificate CA names sent
---
New, (NONE), Cipher is (NONE)
---
secure renegotiation is not supported
Compression: NONE
Expansion: NONE
SSL-Session:
   Protocol: TLSv1 
...

答案1

我收到錯誤訊息...

看起來監聽的服務localhost:389不使用 SSL/TLS。非 LDAP 世界中的等效方法是使用openssl s_client連接埠 80 而不是連接埠 443 進行連線。

你試過636埠嗎?我相信 LDAPS 或 Secure-LDAP。例如,參見如何透過第三方憑證授權單位啟用 LDAP over SSL

否則,您需要弄清楚如何讓 OpenLDAP 在連接埠 389 上啟動 SSL/TLS。

相關內容