From 55bbdd7e98216eebf7e4df7de3407cd845770df3 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Sat, 16 Oct 2021 08:50:16 +0200 Subject: [PATCH] src: add --openssl-legacy-provider option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds an option to Node.js named --openssl-legacy-provider and if specified will load OpenSSL 3.0 Legacy provider. $ ./node --help ... --openssl-legacy-provider enable OpenSSL 3.0 legacy provider Example usage: $ ./node --openssl-legacy-provider -p 'crypto.createHash("md4")' Hash { _options: undefined, [Symbol(kHandle)]: Hash {}, [Symbol(kState)]: { [Symbol(kFinalized)]: false } } Co-authored-by: Richard Lau Refs: https://github.com/nodejs/node/issues/40455 PR-URL: https://github.com/nodejs/node/pull/40478 Backport-PR-URL: https://github.com/nodejs/node/pull/42972 Refs: https://github.com/nodejs/node/issues/40455 Reviewed-By: Richard Lau Reviewed-By: Tobias Nießen --- doc/api/cli.md | 10 ++++++++++ src/crypto/crypto_util.cc | 10 ++++++++++ src/node_options.cc | 3 +++ src/node_options.h | 7 +++++++ .../test-process-env-allowed-flags-are-documented.js | 5 +++++ 5 files changed, 35 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 085d1ff1b3afbb..f5f5368674700a 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -737,6 +737,14 @@ Load an OpenSSL configuration file on startup. Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built against FIPS-enabled OpenSSL. +### `--openssl-legacy-provider` + + +Enable OpenSSL 3.0 legacy provider. For more information please see +[OSSL_PROVIDER-legacy][]. + ### `--pending-deprecation`