【问题标题】:How to disable cURL SSL certificate verification [duplicate]如何禁用 cURL SSL 证书验证 [重复]
【发布时间】:2018-08-07 07:52:57
【问题描述】:

您好,我想为网站使用 API,但我的 curl 命令出错。

我想禁用 SSL 证书验证。

curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.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.

【问题讨论】:

标签: ssl curl ssl-certificate


【解决方案1】:

只需在网址前的某处添加-k 开关即可。

免责声明:使用此功能需您自担风险。

man curl | less +/--insecure

-k, --不安全 (TLS) 默认情况下,curl 建立的每个 SSL 连接都经过验证是安全的。此选项允许 curl 继续和操作 即使对于其他被认为不安全的服务器连接也是如此。

通过确保服务器的证书包含正确的名称并成功验证来验证服务器连接 使用证书存储。

有关详细信息,请参阅此在线资源: https://curl.haxx.se/docs/sslcerts.html

另见 --proxy-insecure 和 --cacert

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-27
    • 1970-01-01
    • 2018-11-04
    • 2013-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-05
    相关资源
    最近更新 更多