mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
Delete test-crypto-ecb.js, which can no longer run anywhere: Blowfish is available only from OpenSSL's legacy provider and is absent from BoringSSL. The addon and cctest version guards become OPENSSL_IS_BORINGSSL checks. Remove legacy digest-alias coverage and unreachable OpenSSL 1.x branches. JavaScript test and benchmark gates, skip reasons, and TLS error expectations that distinguished OpenSSL 1.x from provider-backed OpenSSL now distinguish BoringSSL, including PKCS12 parsing, named DH groups, private-key serialization, RSA-PSS parameters, consolidated provider caches, FIPS availability, and empty KMAC output. Keep the CCM alternate finalization error only for BoringSSL. Provider-only test skips use version-neutral terminology or state the actual minimum OpenSSL version. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: https://github.com/nodejs/node/pull/64777 Fixes: https://github.com/nodejs/node/issues/56733 Refs: https://github.com/nodejs/node/pull/64211 Refs: https://github.com/nodejs/node/pull/63966 Refs: https://github.com/nodejs/node/pull/53329 Refs: https://github.com/nodejs/node/pull/48950 Refs: https://github.com/nodejs/node/issues/45465 Refs: https://github.com/nodejs/node/issues/42827 Refs: https://github.com/nodejs/node/issues/47076 Refs: https://github.com/nodejs/node/pull/62862 Refs: https://github.com/nodejs/node/pull/38512 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
135 lines
3.5 KiB
JavaScript
135 lines
3.5 KiB
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
// Import of pure js (non-shared) deps for comparison
|
|
const acorn = require('../../deps/acorn/acorn/package.json');
|
|
|
|
const expected_keys = [
|
|
'ares',
|
|
'brotli',
|
|
'zstd',
|
|
'modules',
|
|
'uv',
|
|
'v8',
|
|
'zlib',
|
|
'nghttp2',
|
|
'nghttp3',
|
|
'ngtcp2',
|
|
'napi',
|
|
'llhttp',
|
|
'uvwasi',
|
|
'acorn',
|
|
'simdjson',
|
|
'simdutf',
|
|
'ada',
|
|
'nbytes',
|
|
'merve',
|
|
];
|
|
|
|
|
|
const hasUndici = process.config.variables.node_builtin_shareable_builtins.includes('deps/undici/undici.js');
|
|
const hasAmaro = process.config.variables.node_builtin_shareable_builtins.includes('deps/amaro/dist/index.js');
|
|
const hasLief = process.config.variables.node_use_lief;
|
|
|
|
if (process.config.variables.node_use_amaro) {
|
|
if (hasAmaro) {
|
|
expected_keys.push('amaro');
|
|
}
|
|
}
|
|
if (hasUndici) {
|
|
expected_keys.push('undici');
|
|
}
|
|
|
|
if (hasLief) {
|
|
expected_keys.push('lief');
|
|
}
|
|
|
|
if (common.hasCrypto) {
|
|
expected_keys.push('openssl');
|
|
expected_keys.push('ncrypto');
|
|
}
|
|
|
|
if (common.hasIntl) {
|
|
expected_keys.push('icu');
|
|
expected_keys.push('cldr');
|
|
expected_keys.push('tz');
|
|
expected_keys.push('unicode');
|
|
}
|
|
|
|
if (common.hasSQLite) {
|
|
expected_keys.push('sqlite');
|
|
}
|
|
|
|
if (common.hasFFI) {
|
|
expected_keys.push('libffi');
|
|
}
|
|
|
|
expected_keys.sort();
|
|
expected_keys.unshift('node');
|
|
|
|
const actual_keys = Object.keys(process.versions);
|
|
|
|
assert.deepStrictEqual(actual_keys, expected_keys);
|
|
|
|
const commonTemplate = /^\d+\.\d+\.\d+(?:-.*)?$/;
|
|
|
|
assert.match(process.versions.acorn, commonTemplate);
|
|
assert.match(process.versions.ares, commonTemplate);
|
|
assert.match(process.versions.brotli, commonTemplate);
|
|
assert.match(process.versions.llhttp, commonTemplate);
|
|
assert.match(process.versions.merve, commonTemplate);
|
|
assert.match(process.versions.node, commonTemplate);
|
|
assert.match(process.versions.uv, commonTemplate);
|
|
assert.match(process.versions.nbytes, commonTemplate);
|
|
assert.match(process.versions.zlib, /^\d+(?:\.\d+){1,3}(?:-.*)?$/);
|
|
assert.match(process.versions.zstd, commonTemplate);
|
|
|
|
if (process.config.variables.node_use_lief) {
|
|
assert.match(process.versions.lief, commonTemplate);
|
|
}
|
|
|
|
if (common.hasFFI) {
|
|
assert.match(process.versions.libffi, commonTemplate);
|
|
}
|
|
|
|
if (hasUndici) {
|
|
assert.match(process.versions.undici, commonTemplate);
|
|
}
|
|
|
|
assert.match(
|
|
process.versions.v8,
|
|
/^\d+\.\d+\.\d+(?:\.\d+)?-node\.\d+(?: \(candidate\))?$/
|
|
);
|
|
assert.match(process.versions.modules, /^\d+$/);
|
|
|
|
if (common.hasCrypto) {
|
|
assert.match(process.versions.ncrypto, commonTemplate);
|
|
if (process.config.variables.node_shared_openssl) {
|
|
assert.ok(process.versions.openssl);
|
|
} else {
|
|
// The following also matches a development version of OpenSSL, such as
|
|
// '3.0.0-alpha4-dev'. This can be handy when
|
|
// building and linking against the main development branch of OpenSSL.
|
|
assert.match(process.versions.openssl, /^\d+\.\d+\.\d+(?:[-+][a-z0-9]+)*$/);
|
|
}
|
|
}
|
|
|
|
for (let i = 0; i < expected_keys.length; i++) {
|
|
const key = expected_keys[i];
|
|
const descriptor = Object.getOwnPropertyDescriptor(process.versions, key);
|
|
assert.strictEqual(descriptor.writable, false);
|
|
}
|
|
|
|
assert.strictEqual(process.config.variables.napi_build_version,
|
|
process.versions.napi);
|
|
|
|
if (hasUndici) {
|
|
const undici = require('../../deps/undici/src/package.json');
|
|
const expectedUndiciVersion = undici.version;
|
|
assert.strictEqual(process.versions.undici, expectedUndiciVersion);
|
|
}
|
|
|
|
const expectedAcornVersion = acorn.version;
|
|
assert.strictEqual(process.versions.acorn, expectedAcornVersion);
|