资讯

展开

curl访问非安全的ssl证书问题

作者:快盘下载 人气:
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.


今天在刚刚配置https,使用curl访问的时候出现了上边的错误。简单翻译了一下,原因是CA证书不被认可的原因。很可能跟证书认证有关。要解决该证书小锁不显示三角形的问题其实很简单。更新页面中包含http开头的url即可。我是update数据库的。你想怎么处理随意。


curl访问非安全的ssl证书问题


由于是刚刚配置了https,页面内还有部分文件是http开头的。所以小锁加了一个三角。


如果想正确使用curl功能 请使用-k参数


-k允许curl使用非安全的ssl连接并且传输数据(证书不受信)
-K后接参数文件,参数文件中可以定义HTTP请求的相关的内容(URL、HEAD、DATA)


加载全部内容

相关教程
猜你喜欢
用户评论
快盘暂不提供评论功能!