Skip to content

Commit e1d1487

Browse files
committed
Revert "src: exclude node_root_certs when use-def-ca-store"
This reverts commit be98f26. The above commit prevented the functionality of --use-bundled-ca if Node has been built using --openssl-use-def-ca-store, since there will be no bundled ca included and no way to use them. I only noticed this when trying to add // Flags: --use-bundled-ca to test-tls-ccnic-whitelist.js to force it to use the bundled ca and allow the test to pass. PR-URL: #12391 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c05e5bf commit e1d1487

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/node_crypto.cc

-4
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,9 @@ static X509_NAME *cnnic_ev_name =
143143

144144
static Mutex* mutexes;
145145

146-
#if !defined(NODE_OPENSSL_CERT_STORE)
147146
const char* const root_certs[] = {
148147
#include "node_root_certs.h" // NOLINT(build/include_order)
149148
};
150-
#endif
151149

152150
std::string extra_root_certs_file; // NOLINT(runtime/string)
153151

@@ -722,7 +720,6 @@ static int X509_up_ref(X509* cert) {
722720

723721

724722
static X509_STORE* NewRootCertStore() {
725-
#if !defined(NODE_OPENSSL_CERT_STORE)
726723
if (root_certs_vector.empty()) {
727724
for (size_t i = 0; i < arraysize(root_certs); i++) {
728725
BIO* bp = NodeBIO::NewFixed(root_certs[i], strlen(root_certs[i]));
@@ -735,7 +732,6 @@ static X509_STORE* NewRootCertStore() {
735732
root_certs_vector.push_back(x509);
736733
}
737734
}
738-
#endif
739735

740736
X509_STORE* store = X509_STORE_new();
741737
if (ssl_openssl_cert_store) {

0 commit comments

Comments
 (0)