Skip to content

Commit

Permalink
crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL
Browse files Browse the repository at this point in the history
PR-URL: #52217
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
codebytere authored and marco-ippolito committed May 3, 2024
1 parent 64c2c2a commit 0ec4d9d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,8 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
}

if (!(flags & ProcessInitializationFlags::kNoInitOpenSSL)) {
#if HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
#if HAVE_OPENSSL
#ifndef OPENSSL_IS_BORINGSSL
auto GetOpenSSLErrorString = []() -> std::string {
std::string ret;
ERR_print_errors_cb(
Expand Down Expand Up @@ -1179,13 +1180,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 0ec4d9d

Please sign in to comment.