Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: refactor parallel/test-tls-0-dns-altname
  • Loading branch information
juggernaut451 committed Feb 16, 2018
commit a21180f055b5e0dbadbc6a4b8cff438dcef8f1c0
12 changes: 6 additions & 6 deletions test/parallel/test-tls-0-dns-altname.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ const fixtures = require('../common/fixtures');
const server = tls.createServer({
key: fixtures.readSync(['0-dns', '0-dns-key.pem']),
cert: fixtures.readSync(['0-dns', '0-dns-cert.pem'])
}, function(c) {
c.once('data', function() {
}, common.mustCall((c) => {
c.once('data', common.mustCall(() => {
c.destroy();
server.close();
});
}).listen(0, common.mustCall(function() {
const c = tls.connect(this.address().port, {
}));
})).listen(0, common.mustCall(() => {
const c = tls.connect(server.address().port, {
rejectUnauthorized: false
}, common.mustCall(function() {
}, common.mustCall(() => {
const cert = c.getPeerCertificate();
assert.strictEqual(cert.subjectaltname,
'DNS:good.example.org\0.evil.example.com, ' +
Expand Down