相关疑难解决方法(0)

无法验证叶签名

我正在使用node.js request.js来访问api.我收到了这个错误

[错误:UNABLE_TO_VERIFY_LEAF_SIGNATURE]

我的所有凭据都是准确有效的,服务器也很好.我跟邮递员提出了同样的要求.

request({
    "url": domain+"/api/orders/originator/"+id,
    "method": "GET",
    "headers":{
        "X-API-VERSION": 1,
        "X-API-KEY": key
    },
}, function(err, response, body){
    console.log(err);
    console.log(response);
    console.log(body);
});
Run Code Online (Sandbox Code Playgroud)

此代码只是在可执行脚本ex中运行.node ./run_file.js那是为什么?它需要在服务器上运行吗?

javascript ssl request node.js

118
推荐指数
8
解决办法
12万
查看次数

NodeJS UNABLE_TO_VERIFY_LEAF_SIGNATURE

我们尝试使用Node.js(和Mocha)作为测试框架,通过https测试针对内部服务器的API调用.我们使用以下节点模块:Mocha,Restify和Should来执行这些测试.

当我们运行mocha testFileName.js时,我们得到的主要错误是:

[2013-06-19 14:16:28.105] [ERROR] console - FAIL:  Received error!  [Error:        UNABLE_TO_VERIFY_LEAF_SIGNATURE]
Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
at SecurePair.<anonymous> (tls.js:1283:32)
at SecurePair.EventEmitter.emit (events.js:92:17)
at SecurePair.maybeInitFinished (tls.js:896:10)
at CleartextStream.read [as _read] (tls.js:430:15)
at CleartextStream.Readable.read (_stream_readable.js:320:10)
at EncryptedStream.write [as _write] (tls.js:344:25)
at doWrite (_stream_writable.js:219:10)
at writeOrBuffer (_stream_writable.js:209:5)
at EncryptedStream.Writable.write (_stream_writable.js:180:11)
at write (_stream_readable.js:573:24)
at flow (_stream_readable.js:582:7)
at Socket.pipeOnReadable (_stream_readable.js:614:5)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:511:21)
Run Code Online (Sandbox Code Playgroud)

搜索谷歌和stackexchange后,似乎我们有证书问题.从那里我们安装了内部CA'公共'证书,以及我们的应用正在使用的实例特定认证(有多个重定向要通过),到

  /usr/local/etc/openssl/certs, legacy: /System/Library/Keychains/X509Anchors, /Library/Keychains/System.keychain, as well …
Run Code Online (Sandbox Code Playgroud)

ssl node.js

18
推荐指数
3
解决办法
5万
查看次数

标签 统计

node.js ×2

ssl ×2

javascript ×1

request ×1