验证与取证
验证与取证
curl -v -o /dev/null --connect-timeout 5 https://example.com/ 2>&1 | grep -E 'Connected|TLS|handshake|SSL'
openssl s_client -connect example.com:443 -servername example.com -status -tlsextdebug </dev/null 2>&1 | grep -E 'Protocol|Cipher|Verify|OCSP|Session-ID'
# 抓握手报文:
tcpdump -nn -i eth0 -w /tmp/tls.pcap 'host 203.0.113.10 and tcp port 443'| 优化1 | 部署完整证书链(叶证书 + 中间证书,顺序正确) |
|---|---|
| 优化2 | 启用会话复用/会话票据(TLS 1.3 默认支持) |
| 优化3 | 就近接入(CDN/多线路),减少握手 RTT |
| 指标 | curl 的 time_appconnect 与握手报文数量 |
只发叶证书而缺中间证书时,部分客户端(缓存过中间证书)握手正常,表现为『部分用户偶发握手失败/变慢』的疑难现象。