为了完成这项工作,我需要升级到v0.7.8(尽管可以使用任何v0.7都可以),在其中已将rejectUnauthorized功能添加到https.get中。
需要这些选项组合:
agent: false, // or you can supply your own agent, but if you don't you must set to falserejectUnauthorized: true, ca: [ fs.readFileSync('https_simple/cacert.pem') ]现在,如果身份验证失败,您将收到一个“错误”事件,该请求将不会继续。
有关创建自己的代理的详细信息,请参阅https.request
文档。
该更改已提交错误修复:https :
//github.com/joyent/node/commit/f8c335d0



