Reputation: 1580
Node 17 (all versions) return the following error:
https://sandbox.bluesnap.com/services/2/payment-fields-tokens failed, reason: write EPROTO 00DE371301000000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled
I don't have the same issue when using Node 16.
I tried setting
fetch( // node-fetch
'https://sandbox.bluesnap.com/services/2/payment-fields-tokens',
{
agent: new https.Agent({ // fix attempt
rejectUnauthorized: false,
}),
body, // defined somewhere else
}
);
I also set NODE_TLS_REJECT_UNAUTHORIZED=0
in my .env file
and NODE_OPTIONS=--openssl-legacy-provider
and the same issue happens
I know this is probably a problem with bluesnap but a workaround would help while they resolve their issues and I can keep using the latest node version
Upvotes: 6
Views: 3393
Reputation: 1
I believe if you force the TLS version to TLS1.3, "secure renegotiation" will no longer be an issue (it is not supported with TLSv1.3). You can do that by setting the maxVersion to 'TLSv1.3' within your node client. This should allow you to use ws.bluesnap.com domain which support TLS1.3
Upvotes: 0
Reputation: 176
The new version/endpoints for Bluesnap API, are OK with the latest version of NodeJS.
https://sandpay.bluesnap.com https://pay.bluesnap.com
Upvotes: 1
Reputation: 59
If you're using nvm try running this command from the root directory:
nvm install --lts
Upvotes: -1