GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: load bundled and extra certificates off-thread · nodejs/node@6790093

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/crypto
    • crypto_context.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/crypto/crypto_context.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_context.cc
+21-1Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,23 @@ static std::vector<X509*>& GetExtraCACertificates() {
838838
}
839839

840840
static void LoadCACertificates(void* data) {
841+
per_process::Debug(DebugCategory::CRYPTO,
842+
"Started loading bundled root certificates off-thread\n");
843+
GetBundledRootCertificates();
844+
845+
if (!extra_root_certs_file.empty()) {
846+
per_process::Debug(DebugCategory::CRYPTO,
847+
"Started loading extra root certificates off-thread\n");
848+
GetExtraCACertificates();
849+
}
850+
851+
{
852+
Mutex::ScopedLock cli_lock(node::per_process::cli_options_mutex);
853+
if (!per_process::cli_options->use_system_ca) {
854+
return;
855+
}
856+
}
857+
841858
per_process::Debug(DebugCategory::CRYPTO,
842859
"Started loading system root certificates off-thread\n");
843860
GetSystemStoreCACertificates();
@@ -856,9 +873,12 @@ void StartLoadingCertificatesOffThread(
856873
// Get*CACertificates() functions has a function-local static and any
857874
// actual user of it will wait for that to complete initialization.
858875

876+
// --use-openssl-ca is mutually exclusive with --use-bundled-ca and
877+
// --use-system-ca. If it's set, no need to optimize with off-thread
878+
// loading.
859879
{
860880
Mutex::ScopedLock cli_lock(node::per_process::cli_options_mutex);
861-
if (!per_process::cli_options->use_system_ca) {
881+
if (!per_process::cli_options->ssl_openssl_cert_store) {
862882
return;
863883
}
864884
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.