Skip to content

Commit 8904a61

Browse files
committed
crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL
1 parent f1635f4 commit 8904a61

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
@@ -1083,7 +1083,8 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
10831083
}
10841084

10851085
if (!(flags & ProcessInitializationFlags::kNoInitOpenSSL)) {
1086-
#if HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
1086+
#if HAVE_OPENSSL
1087+
#if !defined(OPENSSL_IS_BORINGSSL)
10871088
auto GetOpenSSLErrorString = []() -> std::string {
10881089
std::string ret;
10891090
ERR_print_errors_cb(
@@ -1183,13 +1184,13 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
11831184
CHECK(crypto::CSPRNG(buffer, length).is_ok());
11841185
return true;
11851186
});
1186-
1187+
#endif // defined(OPENSSL_IS_BORINGSSL)
11871188
{
11881189
std::string extra_ca_certs;
11891190
if (credentials::SafeGetenv("NODE_EXTRA_CA_CERTS", &extra_ca_certs))
11901191
crypto::UseExtraCaCerts(extra_ca_certs);
11911192
}
1192-
#endif // HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
1193+
#endif // HAVE_OPENSSL
11931194
}
11941195

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

0 commit comments

Comments
 (0)