【发布时间】:2021-11-29 16:17:03
【问题描述】:
在我的服务器上使用 curl 访问我的其他服务器时,我收到以下响应:
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
使用本地计算机上的 curl 或在浏览器中打开相同的 URL 会显示证书有效。问题似乎是由于letsencrypt shutting down support for an older root certificate。但我只是无法更新服务器的受信任根证书。
我尝试了update-ca-certificates -f -v 并通过wget https://curl.se/ca/cacert.pem -O /etc/ssl/certs/cacert.pem 手动下载更新的根证书,但没有任何效果。
有什么想法吗?
【问题讨论】:
标签: php ssl curl certificate lets-encrypt