我正在尝试从我的服务器测试cURL
命令。该命令正在从JSON
的URL请求https
响应。
cURL
似乎陷入困境,没有任何反应,也没有超时。
但是,我已经在本地计算机上测试了它,cURL
命令工作正常。
我是否需要在服务器上安装SSL证书才能将cURL
命令发送到https
网址?
答案 0 :(得分:0)
No you don't need an SSL cert to send a command like curl via https (unless your server uses two way ssl).
You DO need one at the other end for the https server that receives the command from curl.
However if it's a self signed cert then it may not be recognised by curl and you may get an error instead of a successful connection.
The fact the process is hanging suggests a network/connectivity issue rather than an SSL issue. Can you telnet to the machine using port 443 or does that hang too?
telnet www.example.com 443
Should respond.