我正在尝试使用以下方式为我们的负载均衡器之一(Netscaler)获取SSL / TLS证书:
openssl s_client -showcerts -connect lb.example.com:443
但这不会向我显示证书:
CONNECTED(00000003)
write:errno=54
使用-servername lb.example.com
无济于事,我们的系统管理员告诉我我们的负载平衡器始终不使用SNI。
编辑:服务器在我们的Intranet上,不接受来自公共Internet的连接。这是openssl的输出,其中包含-debug
:
CONNECTED(00000003)
write to 0x7fec7af0abf0 [0x7fec7b803a00] (130 bytes => 130 (0x82))
0000 - 80 80 01 03 01 00 57 00-00 00 20 00 00 39 00 00 ......W... ..9..
0010 - 38 00 00 35 00 00 16 00-00 13 00 00 0a 07 00 c0 8..5............
0020 - 00 00 33 00 00 32 00 00-2f 00 00 9a 00 00 99 00 ..3..2../.......
0030 - 00 96 03 00 80 00 00 05-00 00 04 01 00 80 00 00 ................
0040 - 15 00 00 12 00 00 09 06-00 40 00 00 14 00 00 11 .........@......
0050 - 00 00 08 00 00 06 04 00-80 00 00 03 02 00 80 00 ................
0060 - 00 ff a6 f7 27 1a a7 18-85 cf b2 03 22 fc 48 3d ....'.......".H=
0070 - dd a9 2c b7 76 67 62 80-df 85 ed 48 35 c7 d4 87 ..,.vgb....H5...
0080 - 8d d3 ..
read from 0x7fec7af0abf0 [0x7fec7b809000] (7 bytes => -1 (0xFFFFFFFFFFFFFFFF))
write:errno=54
这是来自的相关输出curl -v https://lb.example.com/
:
$ curl -vI https://lb.exmple.com/
* Trying 1.2.3.4...
* Connected to lb.exmple.com (10.1.2.3) port 443 (#0)
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate: lb.example.com
* Server certificate: RapidSSL SHA256 CA - G2
* Server certificate: GeoTrust Primary Certification Authority - G3
> HEAD / HTTP/1.1
> Host: lb.exmple.com
> User-Agent: curl/7.43.0
> Accept: */*
>
关于如何使用可以获取证书的任何建议openssl s_client
?
-debug
)添加到问题中,则可能会有所帮助。