Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Error: Hostname/IP doesn't match certificate's altnames #1926

Closed
szakaly opened this issue Nov 21, 2015 · 3 comments
Closed

SSL Error: Hostname/IP doesn't match certificate's altnames #1926

szakaly opened this issue Nov 21, 2015 · 3 comments
Labels

Comments

@szakaly
Copy link

szakaly commented Nov 21, 2015

Hy!

I wan't to use your request repo for my project.

My task is, i need to pull a request (with my node.js server; with custom headers and JSON body datas) to an other website / server, where using Self-Signed-Certificate Handshaking...

I worked all day, but i can't fix some issues. Here is my progression and my code:
(I export from Mozilla firefox and google chrome too the certificate and import to ca, where you can see. I get this error message: [Error: Hostname/IP doesn't match certificate's altnames: "Host: hman.aut.bme.hu. is not cert's CN: hman.aut.bme.hu:10080"]
reason: 'Host: hman.aut.bme.hu. is not cert's CN: hman.aut.bme.hu:10080', ...

var options = {
method: 'POST',
url: rows[0].joinURL, //"https://hman.aut.bme.hu:10080/api/data/"
agentOptions: {

         ca: fs.readFileSync('./views/ssl/hman.aut.bme.hu-10080.crt'),
         passphrase: 'password'
      },
      headers: {
         'Content-type': 'application/json',
         'Authorization': rows[0].authCookie  //thats no Cookie, just the name is bad, thats a Basic ...=
      },
      body: kuldes
   };

request(options, callback);

Please, if you have any ideaa, i need the fix this project in my University.
Thank you for your help in advance.

Best regards,

Csaba Szakály

@strictlyd
Copy link

Please refer to #1777.

@alex-shamshurin
Copy link

Same issue here
I set this for server environment, but seems that axios do not see that.

import https from 'https'

axios.defaults.httpsAgent = new https.Agent({
  rejectUnauthorized: false,
})

@stale
Copy link

stale bot commented Nov 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 23, 2018
@stale stale bot closed this as completed Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants