失眠和NodeJS:“错误:对象证书不能使用给定的CA证书进行身份validation”

我试图发送一个GET请求使用失眠应用程序到NodeJS服务器应用程序 – 我没有写应用程序,但已经join了团队。

尽pipe当我从浏览器中点击URL时,我得到了一个合理的JSON响应,但是当我遇到错误“错误:对等证书不能用给定的CA证书进行authentication”时使用失眠。 使用Mac,MacOS 10.12.4。 节点v6.3.1。

失眠的时间表说:

* Preparing request to https://127.0.0.1:9999/ * Enable automatic URL encoding * Enable SSL validation * Enable cookie sending with jar of 2 cookies * Hostname in DNS cache was stale, zapped * Trying 127.0.0.1... * TCP_NODELAY set * Connected to 127.0.0.1 (127.0.0.1) port 9999 (#8) * WARNING: using IP address, SNI is being disabled by the OS. * SSL certificate problem: Invalid certificate chain * Curl_http_done: called premature == 1 * Closing connection 8 

谢谢你的帮助!