Skip to content

Commit

Permalink
crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Mar 26, 2024
1 parent f1635f4 commit 8904a61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/node.cc
Expand Up @@ -1083,7 +1083,8 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
}

if (!(flags & ProcessInitializationFlags::kNoInitOpenSSL)) {
#if HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
#if HAVE_OPENSSL
#if !defined(OPENSSL_IS_BORINGSSL)
auto GetOpenSSLErrorString = []() -> std::string {
std::string ret;
ERR_print_errors_cb(
Expand Down Expand Up @@ -1183,13 +1184,13 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
CHECK(crypto::CSPRNG(buffer, length).is_ok());
return true;
});

#endif // defined(OPENSSL_IS_BORINGSSL)
{
std::string extra_ca_certs;
if (credentials::SafeGetenv("NODE_EXTRA_CA_CERTS", &extra_ca_certs))
crypto::UseExtraCaCerts(extra_ca_certs);
}
#endif // HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
#endif // HAVE_OPENSSL
}

if (!(flags & ProcessInitializationFlags::kNoInitializeNodeV8Platform)) {
Expand Down

0 comments on commit 8904a61

Please sign in to comment.