Skip to content

Commit 0ec4d9d

Browse files
codebyteremarco-ippolito
authored andcommittedMay 3, 2024
crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL
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>
1 parent 64c2c2a commit 0ec4d9d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/node.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,8 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
10791079
}
10801080

10811081
if (!(flags & ProcessInitializationFlags::kNoInitOpenSSL)) {
1082-
#if HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
1082+
#if HAVE_OPENSSL
1083+
#ifndef OPENSSL_IS_BORINGSSL
10831084
auto GetOpenSSLErrorString = []() -> std::string {
10841085
std::string ret;
10851086
ERR_print_errors_cb(
@@ -1179,13 +1180,13 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
11791180
CHECK(crypto::CSPRNG(buffer, length).is_ok());
11801181
return true;
11811182
});
1182-
1183+
#endif // !defined(OPENSSL_IS_BORINGSSL)
11831184
{
11841185
std::string extra_ca_certs;
11851186
if (credentials::SafeGetenv("NODE_EXTRA_CA_CERTS", &extra_ca_certs))
11861187
crypto::UseExtraCaCerts(extra_ca_certs);
11871188
}
1188-
#endif // HAVE_OPENSSL && !defined(OPENSSL_IS_BORINGSSL)
1189+
#endif // HAVE_OPENSSL
11891190
}
11901191

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

0 commit comments

Comments
 (0)
Please sign in to comment.