Centos 下更新 CA 证书,解决 wget 和 curl 请求 https 异常的问题

网络资源 admin 11个月前 (06-12) 330次浏览 0个评论
wget wget https://xxx.com.cn/smc-test/3676513fd63e4480b63d597cca86231e.jpg
ERROR: cannot verify bos-media.sxtvs.com.cn's certificate, issued by ‘/C=CN/O=Baidu, Inc./CN=Baidu, Inc. DV CA’:
  Unable to locally verify the issuer's authority.
To connect to xxx.com.cn insecurely, use `--no-check-certificate'.
curl: (60) Peer's Certificate issuer is not recognized.
More details here: http://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.

解决办法 1

yum -y update ca-certificates
update-ca-trust force-enable
update-ca-trust extract

解决办法 2

从 ssl 证书手工导入 CA 根证书


原文:

https://www.4wei.cn/archives/1002951


VPS小白 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Centos 下更新 CA 证书,解决 wget 和 curl 请求 https 异常的问题
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址