Node.js 22 was released with OpenSSL 3.0 which had a default security level of 1. OpenSSL 3.2 bumped this to 2, but we need to fix this at 1 to minimize disruption to users of Node.js 22.x. PR-URL: https://github.com/nodejs/node/pull/59859 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
16 lines
594 B
JavaScript
16 lines
594 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
if (process.config.variables.node_shared_openssl)
|
|
common.skip('not applicable when dynamically linked to OpenSSL');
|
|
|
|
const secLevel = require('internal/crypto/util').getOpenSSLSecLevel();
|
|
const assert = require('assert');
|
|
|
|
// Node.js 22 was released with OpenSSL 3.0 which had a default security
|
|
// level of 1. OpenSSL 3.2 bumped this to 2, but we need to fix this at
|
|
// 1 to minimize disruption to users of Node.js 22.x.
|
|
assert.strictEqual(secLevel, 1);
|