SSL例程:SSL23_GET_SERVER_HELLO:sslv3警告意外消息

时间:2014-03-17 23:57:02

标签: node.js rest ssl kraken.js

我正在使用restler进行休息通话。我测试并得到了对https://google.com的其余调用的预期响应。现在我正在尝试调用另一个url位置,但是出现以下错误消息:   SSL例程:SSL23_GET_SERVER_HELLO:sslv3警告意外消息:openssl \ ssl \ s23_clnt.c:741:

我使用curl获得了相同url的预期响应(url与此处不同,因为我无法分享它。很抱歉)。

我还尝试了另一个休息客户端,如此link,但收到相同的错误消息。

是否与网站的证书有关,因为在这两种情况下使用的SSL版本都是SSLv3_method。

我正在使用以下代码进行其余调用:

   'use strict';
   module.exports = function (app) {
   app.get('/preference', function (req, res) {
        res.render('preference', {});
   });

    var rest = require('restler');

    rest.get('https://testlink/v1/path').on('complete', function(result) {
      if (result instanceof Error) {
        console.log('Error:', result.message);
      } else {
        console.log(result);
      }
    });

    };

如果有人可以为我提供宝贵的意见,那将是非常有帮助的。感谢。

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,通过添加

解决了这个问题
secureProtocol: 'SSLv3_method'

到node_modules / restler / lib / restler.js行的restler.request:82,如下所示:

this.request = proto.request({
   host: this.url.hostname,
   port: this.url.port,
   path: this._fullPath(),
   method: this.options.method,
   headers: this.headers,
   rejectUnauthorized: this.options.rejectUnauthorized,
   secureProtocol: 'SSLv3_method'   //<---- add this

});

相关问题