Commit a7d74633 authored by Guilherme Souza's avatar Guilherme Souza Committed by Roman Reiss
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
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 22aafa55
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