我愿意:
openssl s_client -connect website.com:443 -tls1_1
并得到:
CONNECTED(00000003)
140120601777808:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1315:SSL alert number 40
140120601777808:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:637:
---
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.1
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1495200033
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---
我在测试 TLS 1.0 时也遇到了类似的问题。
然而,测试 TLS 1.2成功
网站配置(nginx)包括以下内容:
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name website.com www.website.com;
root /var/www/public/website.com;
error_log /var/www/nginx.error.log;
ssl_certificate /etc/letsencrypt/live/website.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/website.com/privkey.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
# Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
ssl_dhparam /etc/nginx/dhparam.pem;
# modern configuration. tweak to your needs.
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers '*EDITED*;
ssl_prefer_server_ciphers on;
# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security max-age=15768000;
# OCSP Stapling ---
# fetch OCSP records from URL in ssl_certificate and cache them
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/letsencrypt/live/website.com/fullchain.pem;
resolver 8.8.8.8 8.8.4.4;
[...]
不知道发生了什么!有什么建议吗?
谢谢!
答案1
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers '*EDITED*;
虽然根据协议 TLS 1.0 .. 1.2 受服务器支持,但问题可能出在密码集上,遗憾的是未详细显示。有一些密码是使用 TLS 1.2 新定义的,只能与 TLS 1.2 一起使用,特别是所有使用 SHA-256 或 SHA-384 作为 HMAC 的密码。如果服务器只接受这些密码,则隐含地意味着只接受 TLS 1.2 协议。
例如,目前显示的现代概况Mozilla SSL 配置生成器仅包含 TLS 1.2 或更高版本可用的密码,因此不能与旧版 TLS 协议一起使用。
答案2
也许你忘记安装mod_ssl
?我在 Google 上搜索了很多,但没有找到解决方案。所以,安装后mod_ssl
一切都正常。
# yum install mod_ssl
或者(对于 Centos 8)
# dnf install mod_ssl