我正在尝试运行openssl命令来缩小尝试从我们的系统发送出站消息时SSL问题的范围.
我在另一个主题中找到了这个命令:使用openssl从服务器获取证书
openssl s_client -connect ip:port -prexit
Run Code Online (Sandbox Code Playgroud)
这导致了输出
CONNECTED(00000003)
15841:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 121 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
Run Code Online (Sandbox Code Playgroud)
这是否意味着服务器没有提供任何证书?我在不同的ip:port上尝试了其他系统,并且它们成功地提供了证书.
相互身份验证是否会影响此命令与-prexit?
--Update--
我再次运行命令
openssl s_client -connect ip:port -prexit
Run Code Online (Sandbox Code Playgroud)
我现在得到了这个回应
CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 121 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
Run Code Online (Sandbox Code Playgroud)
我在命令中添加了-ssl3
openssl s_client -connect ip:port -prexit -ssl3
Run Code Online (Sandbox Code Playgroud)
响应:
CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 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
Krb5 Principal: None
Start Time: 1403907236
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---
Run Code Online (Sandbox Code Playgroud)
还试试-tls1
CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
Krb5 Principal: None
Start Time: 1403907267
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---
Run Code Online (Sandbox Code Playgroud)
pii*_*t79 73
我今天正在调试SSL问题导致同样的write:errno=104错误.最终我发现这种行为的原因是服务器需要SNI(servernameTLS扩展)才能正常工作.提供-servernameopenssl选项使其成功连接:
openssl s_client -connect domain.tld:443 -servername domain.tld
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助.
15841:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
...
SSL handshake has read 0 bytes and written 121 bytes
Run Code Online (Sandbox Code Playgroud)
这是握手失败.另一方关闭连接而不发送任何数据("读取0字节").可能是,另一方根本不会说SSL.但是我看到了破坏SSL实现的类似错误,它们不了解更新的SSL版本.如果通过添加-ssl3到s_client的命令行获得SSL连接,请尝试.
我遇到了write:errno=104尝试使用 openssl s_client 测试连接到启用 SSL 的 RabbitMQ 代理端口的情况。
事实证明,问题很简单,因为用户 RabbitMQ 正在运行,但没有证书文件的读取权限。RabbitMQ 中几乎没有有用的日志记录。
| 归档时间: |
|
| 查看次数: |
93976 次 |
| 最近记录: |