test: fix test-tls-no-sslv3 for OpenSSL 3

OpenSSL 3 has changed the format of the error message for an unknown
option to the CLI. Update the test to allow for the older and newer
message formats.

PR-URL: https://github.com/nodejs/node/pull/38027
Refs: https://github.com/openssl/openssl/pull/10774
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Richard Lau 2021-04-01 16:18:28 +01:00 committed by Myles Borins
parent 960c6be229
commit b02c352ad6
No known key found for this signature in database
GPG Key ID: 933B01F40B5CA946

View File

@ -38,7 +38,7 @@ server.listen(0, '127.0.0.1', function() {
server.on('tlsClientError', (err) => errors.push(err));
process.on('exit', function() {
if (/unknown option -ssl3/.test(stderr)) {
if (/[Uu]nknown option:? -ssl3/.test(stderr)) {
common.printSkipMessage('`openssl s_client -ssl3` not supported.');
} else {
assert.strictEqual(errors.length, 1);