为什么卷曲到https无法正常工作

为什么卷曲到https无法正常工作,第1张

概述我可以毫无问题地做到以下几点: curl -u "username:password" http://www.example.com/exportfile.xml 但是,如果我尝试对我们网站的https版本使用相同的命令,则会失败 curl -u "username:password" https://www.example.com/exportfile.xml 这是错误消息的样子: About 我可以毫无问题地做到以下几点:
curl -u "username:password" http://www.example.com/exportfile.xml

但是,如果我尝试对我们网站的https版本使用相同的命令,则会失败

curl -u "username:password" https://www.example.com/exportfile.xml

这是错误消息的样子:

About to connect() to www.example.com port 443 (#0)Trying "some ip"... connectedConnected to www.example.com (some ip) port 443 (#0)Initializing NSS with certpath: sql:/etc/pki/nssdbCAfile: /etc/pki/tls/certs/ca-bundle.crtCApath: noneNSS error -5938Closing connection #0SSL connect errorcurl: (35) SSL connect error

所有帮助表示赞赏

解决方法 尝试使用-k / – insecure参数.

从手册页:

(SSL) This option explicitly allows curl to perform “insecure” SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections consIDered “insecure” fail unless @H_404_22@-k,--insecure is used.

$curl -sku "username:password" "https://www.example.com/exportfile.xml"

我总是喜欢使用-s / – silent参数,除非我正在下载某些内容并希望查看统计信息.

另请注意,使用-s参数时,使用-s参数不会阻止详细输出.

总结

以上是内存溢出为你收集整理的为什么卷曲到https无法正常工作全部内容,希望文章能够帮你解决为什么卷曲到https无法正常工作所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1039047.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存