如何解决“CRLfile:none"?执行 curl 命令时的错误? [英] how can I resolve "the CRLfile:none" the error when I do curl command?
问题描述
curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer 2118b878-46a8-3b9d-a911-8ac18a0b13cf' 'https://172.17.0.1:8243/V1.0.2/stock/getParam?age=123'
<块引用>
curl: (60) 服务器证书验证失败.CAfile:/etc/ssl/certs/ca-certificates.crt CRLfile:无
我在 API MANAGER PLATFORM 上设计了一个 API 后,我执行 curl 命令并且有上面的日志.如何解决证书?
您可能在使用自签名证书时遇到问题.
获取证书并使用参数 --cacert
对其进行身份验证.
要测试您的功能并且如果您绝对确定证书是可以的,请尝试 -k
以接受无效的证书.但是,您绝不能在生产中和/或如果您不确定它是否是您想要的证书,因为它会剥夺使用 SSL 的价值.
curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer 2118b878-46a8-3b9d-a911-8ac18a0b13cf' 'https://172.17.0.1:8243/V1.0.2/stock/getParam?age=123'
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
After I design an API on API MANAGER PLATFORM, I do the curl command and there is the above logs. How to resolve the cert?
You're probably having trouble with a self-signed certificate.
Get the certificate and use the argument --cacert <certfile>
to authenticate with it.
To test your function and if you are absolutely certain that the certificate is OK, try -k
to accept the invalid certificate. However, you must never, ever do this in production and/or if you are unsure that it is the certificate that you intended as it takes away the value of using SSL.
这篇关于如何解决“CRLfile:none"?执行 curl 命令时的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!