diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2020-04-02 19:49:32 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-04-08 18:35:07 +0300 |
commit | fcde1de382b321bb5f91b5550e34216508377d7d (patch) | |
tree | 4d683b4f388a740cda0a1316a66f58489f3a5d3e /src/node_crypto.cc | |
parent | e2ea73af0447130ca033b59b62092474ed9f4ec4 (diff) |
src: sync access for report and openssl options
Audited usage of per-process OpenSSL and Report options, adding two
required mutexes.
Also documented existence and typical use of the per-process cli option
mutex.
PR-URL: https://github.com/nodejs/node/pull/32618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/node_crypto.cc')
-rw-r--r-- | src/node_crypto.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index f97c29e28e5..348d407f0eb 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -993,6 +993,8 @@ static X509_STORE* NewRootCertStore() { if (*system_cert_path != '\0') { X509_STORE_load_locations(store, system_cert_path, nullptr); } + + Mutex::ScopedLock cli_lock(node::per_process::cli_options_mutex); if (per_process::cli_options->ssl_openssl_cert_store) { X509_STORE_set_default_paths(store); } else { |