聚合国内IT技术精华文章,分享IT技术精华,帮助IT从业人士成长

ATS的HTTPS握手失败的排错经历

2014-10-29 05:55 浏览: 1788051 次 我要评论(0 条) 字号:

我用ATS搭了一个测试网站,然后用curl访问的时候发现CentOS 6可以访问,但是CentOS4就不行。

CentOS 4下curl报告:

SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

然后我用

openssl s_client -connect myhost.com:443 -state -debug -tls1 -msg

看到的message回复是这样:

read from 0xb644fc0 [0xb689760] (5 bytes => 5 (0x5))
0000 - 15 03 01 00 02                                    …..
read from 0xb644fc0 [0xb689765] (2 bytes => 2 (0x2))
0000 - 02 28

其中0x15代表的是alert,而0x28代表的handshake failure

然后我在CentOS6下测试用sslv3去连接,发现也不行。curl会报告

Cannot communicate securely with peer: no common encryption algorithm(s).

我的这个curl用的是NSS而不是Openssl。

后来,我找到了一个网站,https://www.ssllabs.com/ssltest/, 可以在线检查ssl server的SSL兼容性。

它提示说我,我这个测试服务器只有使用SNI的才能连接。于是我恍然大悟啊。

ATS的配置文件ssl_multicert.config中,我以前是这么写的

ssl_cert_name=/etc/trafficserver/ssl/server.crt ssl_key_name=/etc/trafficserver/ssl/server.key

需要改成:

dest_ip=* ssl_cert_name=/etc/trafficserver/ssl/server.crt ssl_key_name=/etc/trafficserver/ssl/server.key

其中dest_ip=*的意思是The corresponding certificate will be used as the global default fallback if no other match can be made.

这个在ATS的文档中有很详细的描述,都怪我看文档不仔细。

This article is from: https://www.sunchangming.com/blog/post/4643.html



网友评论已有0条评论, 我也要评论

发表评论

*

* (保密)

Ctrl+Enter 快捷回复