为什么curl建立连接失败而openssl成功

Why curl fails to establish a connection but openssl succeeds

当我 运行 从我的盒子中输入以下命令时 -

$ openssl s_client -connect **xx.xx.xx.xx:xxxxx** -tls1

Please note that when I use the command like below :

$ openssl s_client -connect **https://xx.xx.xx.xx:xxxxx** -tls1 

I get below error:

getservbyname failure for //xx.xx.xx.xx:xxxxx
usage: s_client args

我连接到 xx.xx.xx.xx:xxxxx,下面是输出 [摘录]:

CONNECTED(00000003)
No client certificate CA names sent
---
SSL handshake has read 3445 bytes and written 423 bytes
...........

但是当我通过 curl 尝试同样的操作时,它失败并出现以下错误:

$curl -v -1 https://xx.xx.xx.xx:xxxxx

* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Closing connection #0
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

我怎样才能毫无问题地连接到同一个盒子端口?

Skip the certificate 用 CURL 检查

$curl -v -k -1 https://xx.xx.xx.xx:xxxxx

或者获取相应的证书和add it to curl