I'm using node v0.10.32. I wanted to create a SOAP request in node.js. I encountered this error: "request Hostname/IP doesn't match certificate's altnames "
As suggested in this link
Node.js Hostname/IP doesn't match certificate's altnames
I should put in {rejectUnauthorized: false}. But it still throws me the same error. (BTW: What does "altname" actually mean?)
My Code looks like this:
var soap = require('soap');
var url = 'https://link.to/my/url/file.wsdl';
var args = {Email: 'my@email.de', Passwort: 'passwort123', deviceMac: '00-14-22-01-23-45'};
soap.createClient(url, {rejectUnauthorized: false}, function(err, client) {
client.myOperation(args, function(err, result) {
console.log(err, result);
});
});
I also tried this (I got the same error message)
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
var soap = require('soap');
var url = 'https://link.to/my/url/file.wsdl';
var args = {Email: 'my@email.de', Passwort: 'passwort123', deviceMac: '00-14-22-01-23-45'};
soap.createClient(url, function(err, client) {
client.myOperation(args, function(err, result) {
console.log(err, result);
});
});
Could it be that the url doesn't start with "https://www."
?