Skip to content

Commit 28d68f3

Browse files
authored
crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL
PR-URL: #52217 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent bb7d748 commit 28d68f3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/node.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,8 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
10871087
}
10881088

10891089
if (!(flags & ProcessInitializationFlags::kNoInitOpenSSL)) {
1090-
#if HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
1090+
#if HAVE_OPENSSL
1091+
#ifndef OPENSSL_IS_BORINGSSL
10911092
auto GetOpenSSLErrorString = []() -> std::string {
10921093
std::string ret;
10931094
ERR_print_errors_cb(
@@ -1187,13 +1188,13 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
11871188
CHECK(crypto::CSPRNG(buffer, length).is_ok());
11881189
return true;
11891190
});
1190-
1191+
#endif // !defined(OPENSSL_IS_BORINGSSL)
11911192
{
11921193
std::string extra_ca_certs;
11931194
if (credentials::SafeGetenv("NODE_EXTRA_CA_CERTS", &extra_ca_certs))
11941195
crypto::UseExtraCaCerts(extra_ca_certs);
11951196
}
1196-
#endif // HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
1197+
#endif // HAVE_OPENSSL
11971198
}
11981199

11991200
if (!(flags & ProcessInitializationFlags::kNoInitializeNodeV8Platform)) {

0 commit comments

Comments
 (0)