我可以毫无问题地执行以下操作:
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)
感谢所有帮助