curl不能处理https链接问题

运行如下命令,则报错

curl https://www.baidu.com/index.html
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

解决方案:必须将服务器证书从 cert.cer 更改为 fullchain.cer

浏览器可能仅使用 cert.cer 就能正常工作,但 curl 或 httpie 等 CLI 程序则需要 fullchain.cer 才能正常工作。

发布日期:
分类:未分类

作者:刹那

命中有时终须有,命中无时需强求。

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注