小编Joe*_*Joe的帖子

Node.js - crypto.js - PFX标题太长了

我正在尝试从文件加载PFX和密码,以便我可以发出HTTPS请求.在我开始之前,我已经知道PFX是好的,这不是问题.

我正在做以下事情:

config.options.pfx = fs.readFileSync('file.pfx');
config.options.passphrase = 'passphrase';
Run Code Online (Sandbox Code Playgroud)

我将我的选择传递给代理人.

config.options.agent = new https.Agent(options);
Run Code Online (Sandbox Code Playgroud)

然后我尝试构建rquest,我收到以下错误:

crypto.js:143
      c.context.loadPKCS12(pfx, passphrase);
            ^
Error: header too long
    at Object.exports.createCredentials (crypto.js:143:17)
    at Object.exports.connect (tls.js:1334:27)
    at Agent.createConnection (https.js:79:14)
    at Agent.createSocket (http.js:1293:16)
    at Agent.addRequest (http.js:1269:23)
    at new ClientRequest (http.js:1416:16)
    at Object.exports.request (https.js:123:10)
Run Code Online (Sandbox Code Playgroud)

我从工作存储库中检查了这一点,我知道这适用于它的原始作者.出于某种原因,我的设置没有运行它.

javascript https pfx node.js

6
推荐指数
1
解决办法
2084
查看次数

GraphQL Schema处理混合类型

我最近开始研究使用GraphQL来请求动态数据配置的可能性.跳出来的第一件事是GraphQL的强类型概念.

GraphQL模式是否有办法处理混合类型对象的数组?我非常感谢您可以阅读的解释或可能的参考.

我目前正在使用GraphQL和Node.js,但稍后的实现将不在Java容器中.所有数据都将从MongoDB中获取JSON.

graphql graphql-js

6
推荐指数
2
解决办法
4194
查看次数

标签 统计

graphql ×1

graphql-js ×1

https ×1

javascript ×1

node.js ×1

pfx ×1