From 86d1c0cc6a5dcf57e413a1cc1c29203e87cf9a14 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 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 Signed-off-by: Signed-off-by: Andrej Valek Upstream-Status: Backport [https://github.com/nodejs/node/issues/40455] --- doc/api/cli.md | 10 ++++++++++ src/crypto/crypto_util.cc | 10 ++++++++++ src/node_options.cc | 10 ++++++++++ src/node_options.h | 7 +++++++ .../test-process-env-allowed-flags-are-documented.js | 5 +++++ 5 files changed, 42 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 74057706bf8d..608b9cdeddf1 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -687,6 +687,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 +[providers readme][]. + ### `--pending-deprecation`