I have a node js app running as mobile service on Azure AMS. I have been using request library to do the HTTPS get/post api calls to an external server. Everything use to work fine till a few days ago when the external entity decided to discontinue supporting TLS 1.0 and below.
I was wondering if someone knows of any known issues of Azure AMS blocking/failing TLS 1.1/1.2 communications with external hosts? That host uses a valid SSL certificate being issued by DigiCert.
Inside my code, I have already tried few things to explicitly tell nodejs to use TLS 1.1 / 1.2 but that didn't work.
var httpRequest = require("request"),
https = require('https');
https.globalAgent.options.secureProtocol = 'TLSv1_2_method'; // Instructing to use TLS 1.2
....
httpRequest.post('https://external-api-url.com', {
'json': true,
'body': params,
'timeout': 20000,
'jar': false,
'headers': {
"Arr-Disable-Session-Affinity": true
}
}, function(err, response, body) {
// Code to handle response.
});
Besides globalAgent, I also tried setting secureProtocol from agentOptions as well as directly from within the options object. None of the approaches worked.
Any help will be greatly appreciated.
Thank-you.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols
, addTLS 1.1\Client
TLS 1.1\Server
TLS 1.2\Client
TLS 1.2\Server
with keysEnabled = 0x01
andDisabledByDefault = 0x00
. Maybe you can have a try. – Shaun Xu