diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-10-26 09:23:55 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2021-03-16 07:59:25 +0300 |
commit | 640fe943544d503288d2e95d3ee14c43e9dec0f6 (patch) | |
tree | 8942d2fa9c71a016a386db1205652d79aa478bfb /src/node.cc | |
parent | 6527e041f7d42ae127adade9862e86093979e64a (diff) |
src,test: support dynamically linking OpenSSL 3.0
This commit enables node to dynamically link against OpenSSL 3.0.
The motivation for opening this PR even though OpenSSL 3.0 has not been
released yet is to allow a nightly CI job to be created. This will
allow us stay on top of changes required for OpenSSL 3.0, and also to
make sure that changes to node crypto do not cause issues when linking
to OpenSSL 3.0.
PR-URL: https://github.com/nodejs/node/pull/37669
Refs: https://github.com/nodejs/node/issues/29817
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node.cc b/src/node.cc index eed3a1dbfa8..b757013ce12 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1015,8 +1015,12 @@ InitializationResult InitializeOncePerProcess(int argc, char** argv) { } // In the case of FIPS builds we should make sure // the random source is properly initialized first. +#if OPENSSL_VERSION_MAJOR >= 3 + if (EVP_default_properties_is_fips_enabled(nullptr)) { +#else if (FIPS_mode()) { OPENSSL_init(); +#endif } // V8 on Windows doesn't have a good source of entropy. Seed it from // OpenSSL's pool. |