Commit 71274b02 authored by Guilherme Souza's avatar Guilherme Souza Committed by Jeremiah Senkpiel
Browse files

tls_wrap: use localhost if options.host is empty

tls.connect(options) with no options.host should accept a certificate
with CN: 'localhost'. Fix Error: Hostname/IP doesn't match
certificate's altnames: "Host: undefined. is not cert's CN: localhost"

'localhost' is not added directly to defaults because that is not
always desired (for example, when using options.socket)

PR-URL: https://github.com/iojs/io.js/pull/1493
PORT-PR-URL: https://github.com/iojs/io.js/pull/1560
PORT-FROM: v2.x / a7d74633
Fixes: https://github.com/iojs/io.js/issues/1489


Reviewed-By: default avatarBrendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: default avatarRoman Reiss <me@silverwind.io>
parent 0eb74a8b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment