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
10 changes: 5 additions & 5 deletions test/parallel/test-tls-ecdh-disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ var options = {

var server = tls.createServer(options, common.fail);

server.listen(0, '127.0.0.1', function() {
server.listen(0, '127.0.0.1', common.mustCall(function() {
var cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers +
` -connect 127.0.0.1:${this.address().port}`;

// for the performance and stability issue in s_client on Windows
if (common.isWindows)
cmd += ' -no_rand_screen';

exec(cmd, function(err, stdout, stderr) {
exec(cmd, common.mustCall(function(err, stdout, stderr) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs a common.mustCall() on the server.listen() callback.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjihrig Went ahead and updated this. Thank you for the feedback.

// Old versions of openssl will still exit with 0 so we
// can't just check if err is not null.
assert.notEqual(stderr.indexOf('handshake failure'), -1);
assert(stderr.includes('handshake failure'));
server.close();
});
});
}));
}));