2

I need to send request to a web server which is TLS 1.2 in node soap any idea how to achieve that?

moein rahimi
  • 774
  • 10
  • 20

1 Answers1

0

You have to set the secureOptions with a constant on the ClientSSLSecurity method.

var constants = require('constants');

client.setSecurity(new soap.ClientSSLSecurity(
    '/path/to/key',
    '/path/to/cert',
    '/path/to/ca-cert',
    {
        strictSSL: true,
        rejectUnauthorized: false,
        hostname: 'some-hostname',
        secureOptions: constants.SSL_OP_NO_TLSv1_2,
        forever: true,
    },
));
tomasantunes
  • 814
  • 2
  • 11
  • 23