【发布时间】:2021-05-10 21:55:15
【问题描述】:
我正在尝试使用带有 sslv3 和密码 RC4-SHA:RC4-MD5 支持的 Nginx 运行服务器(我需要这些密码)。 我能够在 Ubuntu 16.04 上使用 Openssl 1.0.2u 源 + 上一个 nginx 版本源 (nginx-1.19.6) 做到这一点。我使用这个命令构建了 Nginx:
./configure --with-http_ssl_module --with-openssl=/path/to/openssl-1.0.2u --with-openssl-opt=enable-ssl3 --with-openssl-opt=enable-ssl3-method --with-openssl-opt=enable-weak-ssl-ciphers
我使用的 Nginx 配置是:
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_protocols SSLv3;
ssl_ciphers RC4-SHA:RC4-MD5:@SECLEVEL=0;
ssl_certificate /path/to/server-chain.crt;
ssl_certificate_key /path/to/server.key;
server_name server.name.net;
underscores_in_headers on;
proxy_pass_request_headers on;
location / {
proxy_set_header X-Forwarded-Host \$host:\$server_port;
proxy_set_header X-Forwarded-Server \$host;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9000;
}
}
设置 nginx 配置文件后,一切正常。我能够从 Ubuntu 14.04 机器上使用此命令获取 ssl 证书:
openssl s_client -connect MyIP:443 -ssl3 -cipher RC4-SHA:RC4-MD5.
我尝试使用具有相同配置选项的 Openssl 1.1.1i 源代码构建 Nginx,但是在设置 nginx conf 文件后,当我尝试运行 openssl s_client -connect... 命令时,出现此错误:
CONNECTED(00000003)
140420793624224:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:339:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 5 bytes and written 7 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : SSLv3
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1612540521
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---
在 Nginx error.log 文件中我得到了这个:
SSL_do_handshake() failed (SSL: error:141FC044:SSL routines:tls_setup_handshake:internal error) while SSL handshaking, client: 192.168.1.10, server: 0.0.0.0:443
openssl 1.1.1 有什么变化吗?我是否缺少启用 SSLv3 + RC4-SHA:RC4-MD5 的任何配置选项? 感谢您的任何提示!
【问题讨论】: