cURL 报告自签名证书无效

cURL 报告自签名证书无效

我正在尝试使用一些工具来管理各种设备,但发现我无法再连接任何运行网络服务器的设备。

后来进行一些故障排除后发现 cURL 引发了这个错误。

curl: (60) SSL certificate problem: self-signed certificate in certificate chain
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.

我已经访问过该网站并安装了为 GlobalSign 提取的根证书,并将其放在 /usr/local/share/ca-certificates/ 中,并以 .CRT 为扩展名。

但是更新证书时,系统声称由于证书重复而被跳过。我尝试通过 apt-get 强制更新所有证书,并使用:

sudo update-ca-certificates

毫无效果。我试图理解这个问题,但恐怕我不明白。我从未直接自签名证书,所以除非由系统生成,否则证书不可能过期。即便如此,更新根证书也应该可以解决这个问题。

有人能给我一些建议吗?下一步我可以采取什么措施来解决这个问题?不幸的是,我需要使用的产品不是 cURL,这意味着我不能简单地忽略这个警报。我也不想完全忽略证书验证,因为我发现的一个建议是这样的。

相关内容