谁让我得到 https.request() 来信任我的内部签名的服务器证书。这是我在 v0.10.25 中运行的代码的一个简单示例:
var options = {
hostname: 'encrypted.mydomain.local',
port: 443,
path: '/',
method: 'GET'
};
var https = require('https')
https.request(options)
我在一个 Windows 系统上运行它,我的内部根 CA 在系统级别受信任,但是每当我提出这样的请求时,我都会遇到异常
events.js:72
throw er; // Unhandled 'error' event
^
Error: CERT_UNTRUSTED
at SecurePair.<anonymous> (tls.js:1370:32)
at SecurePair.EventEmitter.emit (events.js:92:17)
at SecurePair.maybeInitFinished (tls.js:982:10)
at CleartextStream.read [as _read] (tls.js:469:13)
at CleartextStream.Readable.read (_stream_readable.js:320:10)
at EncryptedStream.write [as _write] (tls.js:366:25)
at doWrite (_stream_writable.js:223:10)
at writeOrBuffer (_stream_writable.js:213:5)
at EncryptedStream.Writable.write (_stream_writable.js:180:11)
at write (_stream_readable.js:583:24)
更详细一点,这一切都发生在我试图用于身份验证的node-atlassian-crowd模块内部