Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove OpenSSL 1.0.2 error message compat #46709

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions test/parallel/test-tls-junk-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ server.listen(0, function() {
req.end();

req.once('error', common.mustCall(function(err) {
// OpenSSL 1.0.x and 1.1.x use different error messages for junk inputs.
assert(/unknown protocol/.test(err.message) ||
/wrong version number/.test(err.message));
assert(/wrong version number/.test(err.message));
server.close();
}));
});
4 changes: 1 addition & 3 deletions test/parallel/test-tls-no-sslv3.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ process.on('exit', function() {
common.printSkipMessage('`openssl s_client -ssl3` not supported.');
} else {
assert.strictEqual(errors.length, 1);
// OpenSSL 1.0.x and 1.1.x report invalid client versions differently.
assert(/:wrong version number/.test(errors[0].message) ||
/:version too low/.test(errors[0].message));
assert(/:version too low/.test(errors[0].message));
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ const server = tls.createServer({})
}).on('tlsClientError', common.mustCall(function(e) {
assert.ok(e instanceof Error,
'Instance of Error should be passed to error handler');
// OpenSSL 1.0.x and 1.1.x use different error codes for junk inputs.
assert.ok(
/SSL routines:[^:]*:(unknown protocol|wrong version number)/.test(
/SSL routines:[^:]*:wrong version number/.test(
e.message),
'Expecting SSL unknown protocol');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ const server = net.createServer(function(c) {
s.on('error', common.mustCall(function(e) {
assert.ok(e instanceof Error,
'Instance of Error should be passed to error handler');
// OpenSSL 1.0.x and 1.1.x use different error codes for junk inputs.
assert.ok(
/SSL routines:[^:]*:(unknown protocol|wrong version number)/.test(
/SSL routines:[^:]*:wrong version number/.test(
e.message),
'Expecting SSL unknown protocol');
}));
Expand Down