证书不受信任的定位与修复
报 certificate verify failed、unable to get local issuer certificate、self-signed certificate 或 unable to get issuer certificate。证书可能没过期,但客户端不信任它。
openssl s_client -connect <host>:443 -servername <host> -showcerts
openssl verify -CAfile ca.pem cert.pem
curl -v --cacert ca.pem https://<host>/
ls /etc/ssl/certs
update-ca-certificates --dry-run
s_client -showcerts 看完整链,确认叶子、中间和根的顺序。ssl_certificate 链文件。--cacert/CAfile 显式指定。update-ca-certificates / trust anchor)。openssl — 证书链验证curl — 指定 CA 验证update-ca-certificates — 更新系统信任库