cURL报自签名证书链错误,无法连接Web服务器设备的排查求助
我最近在用工具管理各类设备时,发现没法连接任何运行Web服务器的设备了。
排查了一番后,发现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,所以没法直接忽略这个错误提示;而且我也不想全局关闭证书验证,这是我看到的一个建议,但不太想这么做。
备注:内容来源于stack exchange,提问作者Moridn

