node icon indicating copy to clipboard operation
node copied to clipboard

https: certificate validation fails when using servername option

Open skenqbx opened this issue 11 years ago • 3 comments

Agent#createSocket() overwrites options.servername leading to a tls.checkServerIdentity() against hostname instead of servername.

I usually disabled connection pooling in that case, but that is not possible anymore as ClientRequest#constructor always sets an agent.

Not sure if this is intentional; Did I overlook something in the changelog?

skenqbx avatar Mar 09 '15 12:03 skenqbx

I provide a PR incl. test for Agent#createSocket() when I get the go ahead.

skenqbx avatar Mar 09 '15 14:03 skenqbx

/cc @indutny - seems like an unambiguous bug to me..

bnoordhuis avatar Mar 09 '15 17:03 bnoordhuis

Surely a bug, @skenqbx please go ahead ;) Please submit a test first, though. Just to make sure that we are on the same page.

indutny avatar Mar 09 '15 18:03 indutny