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 f4cdc6f

Browse filesBrowse files
tniessentargos
authored andcommitted
test: remove OpenSSL 1.0.2 error message compat
While upgrading from OpenSSL 1.0.2 to 1.1.1, these tests were modified to recognize error messages from both OpenSSL releases. Given that OpenSSL 1.0.2 has been unsupported for years, it is safe to remove the older message patterns. Refs: #16130 PR-URL: #46709 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent d4899b2 commit f4cdc6f
Copy full SHA for f4cdc6f

File tree

Expand file treeCollapse file tree

4 files changed

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

4 files changed

+4
-10
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-tls-junk-server.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-junk-server.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ server.listen(0, function() {
2121
req.end();
2222

2323
req.once('error', common.mustCall(function(err) {
24-
// OpenSSL 1.0.x and 1.1.x use different error messages for junk inputs.
25-
assert(/unknown protocol/.test(err.message) ||
26-
/wrong version number/.test(err.message));
24+
assert(/wrong version number/.test(err.message));
2725
server.close();
2826
}));
2927
});
Collapse file

‎test/parallel/test-tls-no-sslv3.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-no-sslv3.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ process.on('exit', function() {
4242
common.printSkipMessage('`openssl s_client -ssl3` not supported.');
4343
} else {
4444
assert.strictEqual(errors.length, 1);
45-
// OpenSSL 1.0.x and 1.1.x report invalid client versions differently.
46-
assert(/:wrong version number/.test(errors[0].message) ||
47-
/:version too low/.test(errors[0].message));
45+
assert(/:version too low/.test(errors[0].message));
4846
}
4947
});
Collapse file

‎test/parallel/test-tls-server-failed-handshake-emits-clienterror.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-server-failed-handshake-emits-clienterror.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ const server = tls.createServer({})
2020
}).on('tlsClientError', common.mustCall(function(e) {
2121
assert.ok(e instanceof Error,
2222
'Instance of Error should be passed to error handler');
23-
// OpenSSL 1.0.x and 1.1.x use different error codes for junk inputs.
2423
assert.ok(
25-
/SSL routines:[^:]*:(unknown protocol|wrong version number)/.test(
24+
/SSL routines:[^:]*:wrong version number/.test(
2625
e.message),
2726
'Expecting SSL unknown protocol');
2827

Collapse file

‎test/parallel/test-tls-socket-failed-handshake-emits-error.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-socket-failed-handshake-emits-error.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ const server = net.createServer(function(c) {
2020
s.on('error', common.mustCall(function(e) {
2121
assert.ok(e instanceof Error,
2222
'Instance of Error should be passed to error handler');
23-
// OpenSSL 1.0.x and 1.1.x use different error codes for junk inputs.
2423
assert.ok(
25-
/SSL routines:[^:]*:(unknown protocol|wrong version number)/.test(
24+
/SSL routines:[^:]*:wrong version number/.test(
2625
e.message),
2726
'Expecting SSL unknown protocol');
2827
}));

0 commit comments

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