test: relax version check with shared OpenSSL
Relax the OpenSSL version check when Node.js is built with the `--shared-openssl` option. Verify only that `process.versions.openssl` is truthy. Fixes: https://github.com/nodejs/node/issues/43078 PR-URL: https://github.com/nodejs/node/pull/50505 Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
parent
309c71ae38
commit
3e3467e77a
@ -75,13 +75,17 @@ assert.match(process.versions.modules, /^\d+$/);
|
|||||||
assert.match(process.versions.cjs_module_lexer, commonTemplate);
|
assert.match(process.versions.cjs_module_lexer, commonTemplate);
|
||||||
|
|
||||||
if (common.hasCrypto) {
|
if (common.hasCrypto) {
|
||||||
const versionRegex = common.hasOpenSSL3 ?
|
if (process.config.variables.node_shared_openssl) {
|
||||||
// The following also matches a development version of OpenSSL 3.x which
|
assert.ok(process.versions.openssl);
|
||||||
// can be in the format '3.0.0-alpha4-dev'. This can be handy when building
|
} else {
|
||||||
// and linking against the main development branch of OpenSSL.
|
const versionRegex = common.hasOpenSSL3 ?
|
||||||
/^\d+\.\d+\.\d+(?:[-+][a-z0-9]+)*$/ :
|
// The following also matches a development version of OpenSSL 3.x which
|
||||||
/^\d+\.\d+\.\d+[a-z]?(\+quic)?(-fips)?$/;
|
// can be in the format '3.0.0-alpha4-dev'. This can be handy when
|
||||||
assert.match(process.versions.openssl, versionRegex);
|
// building and linking against the main development branch of OpenSSL.
|
||||||
|
/^\d+\.\d+\.\d+(?:[-+][a-z0-9]+)*$/ :
|
||||||
|
/^\d+\.\d+\.\d+[a-z]?(\+quic)?(-fips)?$/;
|
||||||
|
assert.match(process.versions.openssl, versionRegex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < expected_keys.length; i++) {
|
for (let i = 0; i < expected_keys.length; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user