-
-
Save RafaelGSS/bde210dddc7a3019e867ba52db037ade to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M src/node.cc | |
@@ -1111,6 +1111,20 @@ InitializationResult InitializeOncePerProcess( | |
fprintf(stderr, "OpenSSL error when trying to enable FIPS:\n"); | |
ERR_print_errors_fp(stderr); | |
return result; | |
+ } | |
+ | |
+ // Seed V8's PRNG from OpenSSL's pool. This is recommended by V8 and a | |
+ // potentially better source of randomness than what V8 uses by default, but | |
+ // it does not guarantee that pseudo-random values produced by V8 will be | |
+ // cryptograhically secure. | |
+ V8::SetEntropySource(crypto::EntropySource); | |
+#endif // HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL) | |
+ } | |
+ | |
+ if (!(flags & ProcessInitializationFlags::kNoInitializeNodeV8Platform)) { | |
+ per_process::v8_platform.Initialize( | |
+ static_cast<int>(per_process::cli_options->v8_thread_pool_size)); | |
+ result->platform_ = per_process::v8_platform.Platform(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment