Skip to content

Commit

Permalink
test: refactor parallel/test-tls-0-dns-altname
Browse files Browse the repository at this point in the history
  • Loading branch information
juggernaut451 committed Feb 16, 2018
1 parent a16081c commit a21180f
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit a21180f

Please sign in to comment.