Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nodejs SSL handshake error on aws

I am trying to hit third party api splash payment from my nodejs application. To hit api I am using response module

var options = {
    method: 'post',
    body: postData,
    json: true,
    url: url,
    headers: {
        "Content-Type": "application/json",
        "APIKEY" : config.splash_key
    }
}
request(options, function (err, res, body) {

    if (err) {
      console.error('error posting json: ', err);
      return cb( err  , null);

      // throw err;
    }

    return cb( body.response.errors  , body.response.data);
})

But it gives me error

Error: write EPROTO 140467444299648:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/s23_clnt.c:772:

Please help

like image 718
Irfan Khan Avatar asked Oct 20 '25 20:10

Irfan Khan


1 Answers

I found the solution myself, the problem was node version it was 9+ so I downgraded to 6.9. So problem was solved

like image 150
Irfan Khan Avatar answered Oct 23 '25 09:10

Irfan Khan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!