| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 095e7a8 commit 19a7b1e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -836,6 +836,23 @@ static std::vector<X509*>& GetExtraCACertificates() { | |||
| 836 | 836 | } | |
| 837 | 837 | ||
| 838 | 838 | static void LoadCACertificates(void* data) { | |
| 839 | + per_process::Debug(DebugCategory::CRYPTO, | ||
| 840 | + "Started loading bundled root certificates off-thread\n"); | ||
| 841 | + GetBundledRootCertificates(); | ||
| 842 | + | ||
| 843 | + if (!extra_root_certs_file.empty()) { | ||
| 844 | + per_process::Debug(DebugCategory::CRYPTO, | ||
| 845 | + "Started loading extra root certificates off-thread\n"); | ||
| 846 | + GetExtraCACertificates(); | ||
| 847 | + } | ||
| 848 | + | ||
| 849 | + { | ||
| 850 | + Mutex::ScopedLock cli_lock(node::per_process::cli_options_mutex); | ||
| 851 | + if (!per_process::cli_options->use_system_ca) { | ||
| 852 | + return; | ||
| 853 | + } | ||
| 854 | + } | ||
| 855 | + | ||
| 839 | 856 | per_process::Debug(DebugCategory::CRYPTO, | |
| 840 | 857 | "Started loading system root certificates off-thread\n"); | |
| 841 | 858 | GetSystemStoreCACertificates(); | |
@@ -854,9 +871,12 @@ void StartLoadingCertificatesOffThread( | |||
| 854 | 871 | // Get*CACertificates() functions has a function-local static and any | |
| 855 | 872 | // actual user of it will wait for that to complete initialization. | |
| 856 | 873 | ||
| 874 | + // --use-openssl-ca is mutually exclusive with --use-bundled-ca and | ||
| 875 | + // --use-system-ca. If it's set, no need to optimize with off-thread | ||
| 876 | + // loading. | ||
| 857 | 877 | { | |
| 858 | 878 | Mutex::ScopedLock cli_lock(node::per_process::cli_options_mutex); | |
| 859 | - if (!per_process::cli_options->use_system_ca) { | ||
| 879 | + if (!per_process::cli_options->ssl_openssl_cert_store) { | ||
| 860 | 880 | return; | |
| 861 | 881 | } | |
| 862 | 882 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments