curl https 自定义证书出现 CA 错误:curl: (

2017-08-14  本文已影响794人  9682f4e55d71

访问自定义的域名时,回出现下面错误,
可在url前面加上 -k 临时解决, 如 curl -k https://m.dbquan.com/api/products.

$ curl  https://m.dbquan.com/api/products
curl: (60) SSL certificate problem: self signed certificate
More details here: https://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-proxy has similar options --proxy-cacert and --proxy-insecure.
上一篇 下一篇

猜你喜欢

热点阅读