小编ITF*_*Fun的帖子

为什么 curl 到 https 不起作用

我可以毫无问题地执行以下操作:

curl -u "username:password" http://www.example.com/exportfile.xml
Run Code Online (Sandbox Code Playgroud)

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

curl -u "username:password" https://www.example.com/exportfile.xml
Run Code Online (Sandbox Code Playgroud)

这是错误消息的样子:

About to connect() to www.example.com port 443 (#0)
Trying "some ip"... connected
Connected to www.example.com (some ip) port 443 (#0)
Initializing NSS with certpath: sql:/etc/pki/nssdb
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
NSS error -5938
Closing connection #0
SSL connect error
curl: (35) SSL connect error
Run Code Online (Sandbox Code Playgroud)

感谢所有帮助

https curl

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

curl ×1

https ×1