問題描述
如何修復 ERR_SSL_VERSION_OR_CIPHER_MISMATCH 錯誤? (How to fix ERR_SSL_VERSION_OR_CIPHER_MISMATCH error?)
如何修復 ERR_SSL_VERSION_OR_CIPHER_MISMATCH 錯誤?
在我們的一台 CentOS 服務器中,我們在 Chrome 中遇到以下錯誤
無法建立安全連接,因為這站點使用不支持的協議,錯誤代碼 ‑ ERR_SSL_VERSION_OR_CIPHER_MISMATCH
我們嘗試了以下命令 ‑ openssl s_client ‑connect <>:<> ‑tls1_2
它給出以下輸出。它不提供證書鍊和協商密碼。
$ openssl s_client ‑connect <<domain>>:<<port>> ‑tls1_2
CONNECTED(00000003)
139874418423624:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1275:SSL alert number 40
139874418423624:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:598:
‑‑‑
no peer certificate available
‑‑‑
No client certificate CA names sent
‑‑‑
SSL handshake has read 7 bytes and written 0 bytes
‑‑‑
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL‑Session:
Protocol : TLSv1.2
Cipher : 0000
Session‑ID:
Session‑ID‑ctx:
Master‑Key:
Key‑Arg : None
Krb5 Principal: None
PSK identity: None
PSK identity hint: None
Start Time: 1505770082
Timeout : 7200 (sec)
Verify return code: 0 (ok)
我們使用命令 ‑ # /usr/bin/openssl ciphers ‑v
檢查了 VM 上的可用密碼。此命令提供可用密碼列表,其中還包括 TLS 1.2 支持的密碼
我們還檢查了證書。相同的證書適用於不同的服務器。
有人可以指導一下這種情況下缺少什麼嗎?
參考解法
方法 1:
When we use openssl
, if the connection gets terminated with the alert 40
error, that means we should explicitly specify the servername in our command, so that the server can return the right certificate the client is expecting.
Specify the exact hostname you want with ‑servername
parameter. E.g:
openssl s_client ‑connect yourserver.domain.com:443 ‑servername yourserver.domain.com