【发布时间】:2019-05-09 08:53:56
【问题描述】:
我正在尝试使用 GID 获取员工信息,例如姓名和电子邮件,但在尝试发送 Post 请求时出现以下错误。
错误:写入 EPROTO 101057795:error:14094410:SSL 例程:ssl3_read_bytes:sslv3 警报握手
在 WriteWrap.afterWrite [as oncomplete] (net.js:864:14) 代码:'EPROTO',errno:'EPROTO', 系统调用:'写'}
这就是我的代码的样子
var request = require('request');
// Set the headers
var headers = {
'User-Agent': 'deprecated',
'accepted': 'application/json',
'applicationuser':'deprecated'
}
// Configure the request
var options = {
url: 'https://***/***/persons/gid=***',
method: 'POST',
secureProtocol : "TLSv1_2_method",
headers: headers
}
// Start the request
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
else{console.log(error)}
})
【问题讨论】:
-
@james 您认为解决方案应该是什么?上面的sn-p代码有什么要补充的吗?
-
这表明某些版本的 openSSL 在尝试通过负载均衡器连接到一组不具有相同版本 TLS 的服务器时难以降级连接。我不知道升级到更新的 openSSL 是否会解决它,但我会试一试。
-
如何尝试升级openSSL的版本?我只是这个话题的新手:(
-
我从来没有做过。我会谷歌它。
标签: node.js ssl https openssl http-post