Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff43209

Browse filesBrowse files
juggernaut451MylesBorins
authored andcommitted
test: refactor parallel/test-tls-0-dns-altname
PR-URL: #18803 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 0eead8c commit ff43209
Copy full SHA for ff43209

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-tls-0-dns-altname.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-0-dns-altname.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ const fixtures = require('../common/fixtures');
3333
const server = tls.createServer({
3434
key: fixtures.readSync(['0-dns', '0-dns-key.pem']),
3535
cert: fixtures.readSync(['0-dns', '0-dns-cert.pem'])
36-
}, function(c) {
37-
c.once('data', function() {
36+
}, common.mustCall((c) => {
37+
c.once('data', common.mustCall(() => {
3838
c.destroy();
3939
server.close();
40-
});
41-
}).listen(0, common.mustCall(function() {
42-
const c = tls.connect(this.address().port, {
40+
}));
41+
})).listen(0, common.mustCall(() => {
42+
const c = tls.connect(server.address().port, {
4343
rejectUnauthorized: false
44-
}, common.mustCall(function() {
44+
}, common.mustCall(() => {
4545
const cert = c.getPeerCertificate();
4646
assert.strictEqual(cert.subjectaltname,
4747
'DNS:good.example.org\0.evil.example.com, ' +

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.