Hostname/IP doesn't match certificate's altnames even with agentOptions.servername set
See original GitHub issueaxios version: 0.18.0 node version: 8.11.2
I’m getting the following this exception:
Hostname/IP doesn't match certificate's altnames: "Host: localhost. is not in the cert's altnames: DNS:localhost.company.com"
When trying to make the following request:
axios({
method: 'get',
url: `https://localhost:${API_PORT}`,
agentOptions: new https.Agent({
pfx: clientCert,
passphrase: password,
ca: ca,
servername: 'localhost.company.com'
})
});
The altname for the certificate was signed as “localhost.company.com”. When I make the same request w/ request-promise it works, it seems the ‘servername’ field doesnt get honor.
request({
method: 'GET',
uri: `https://localhost:${API_PORT}`,
agentOptions: {
pfx: clientCert,
passphrase: password,
ca: ca,
servername: 'localhost.company.com'
}
})
``
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Node.js Hostname/IP doesn't match certificate's altnames
Generally speaking, it's a good idea to use the stable versions of node (even version numbers, 0.6.x, 0.8.x) for non-development code. The ...
Read more >Hostname/IP does not match certificate's altnames: Host
I am trying to upload files to linode object storage using nodejs & aws-sdk but getting following error: ``` NetworkingError [ERR_TLS_CERT_ALTNAME_INVALID]: ...
Read more >Solved: Getting the Error: Hostname/IP doesn't match certi...
The "Error:Hostname/IP doesn't match certificate's altnames" ... With the servername, I was able to get the server certificate information.
Read more >Hostname/IP does not match certificate's alternates - General
Hello everyone ! I have installed Node Red on Synology NAS using Docker. I have also imported these nodes I am experiencing an...
Read more >Hostname/IP doesn't match certificate's altnames | Node & Nginx
And why does he accidentally switch to the ampinbaunatal.de domain? Nginx config for both servers: server { server_name oauth2.healform.de; ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@b4dnewz If you’re using nodejs put this before make the request:
Axios also support it…
Hey can anyone let me know why does that actually happens. Would be really helpful. Thanks in advance.