gpt4 book ai didi

node.js openssl 错误 : dh key too small

转载 作者:搜寻专家 更新时间:2023-10-31 23:08:19 24 4
gpt4 key购买 nike

我在尝试使用 node-soap 发出 soap 请求时遇到了问题。错误只出现在 ubuntu 上,我也在 Windows 上测试过 - 代码(显然不包括 curl)在那里工作。

我得到的错误是:

Unhandled rejection Error: write EPROTO 140332284700480:error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small:../deps/openssl/openssl/ssl/s3_clnt.c:3615:

我也试过使用 request/request 也失败了。使用普通 curl 时,我会收到来 self 尝试连接的服务器的响应。

这是我使用的代码:

exec('curl ' + url, function(err, res) {
log(err); // null
log(res); // expected response
});

request.postAsync({
url,
rejectUnauthorized: false,
requestCert: true,
}).then(val => {
log(val);
}).catch(err => {
log(err); // above error message
})

soap.createClientAsync(url).then(val => {
log(val);
}).catch(err => {
log(err); // above error message
})

我已经在以下版本上进行了测试:

Node 4.4.0 和 5.8.0,ubuntu 服务器版本 14.04 和 ubuntu 15.04 桌面

openssl 版本是 OpenSSL 1.0.2f 2016 年 1 月 28 日

有人可以帮助我吗?是否有可能以某种方式使这项工作正常进行?

最佳答案

服务器很可能在 TLS 握手期间尝试使用不太安全的 Diffie-Hellman key 。唯一的解决办法是服务器管理员升级/修复他们的软件。

关于node.js openssl 错误 : dh key too small,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35984308/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com