@@ -2862,12 +2862,15 @@ The following values are valid for `mode`:
28622862### ` --use-system-ca `
28632863
28642864Node.js uses the trusted CA certificates present in the system store along with
2865- the ` --use-bundled-ca ` , ` --use-openssl-ca ` options.
2865+ the ` --use-bundled-ca ` option and the ` NODE_EXTRA_CA_CERTS ` environment variable.
2866+ On platforms other than Windows and macOS, this loads certificates from the directory
2867+ and file trusted by OpenSSL, similar to ` --use-openssl-ca ` , with the difference being
2868+ that it caches the certificates after first load.
28662869
2867- This option is only supported on Windows and macOS, and the certificate trust policy
2868- is planned to follow [ Chromium's policy for locally trusted certificates] [ ] :
2870+ On Windows and macOS, the certificate trust policy is planned to follow
2871+ [ Chromium's policy for locally trusted certificates] [ ] :
28692872
2870- On macOS, the following certifcates are trusted :
2873+ On macOS, the following settings are respected :
28712874
28722875* Default and System Keychains
28732876 * Trust:
@@ -2877,8 +2880,8 @@ On macOS, the following certifcates are trusted:
28772880 * Any certificate where the “When using this certificate” flag is set to “Never Trust” or
28782881 * Any certificate where the “Secure Sockets Layer (SSL)” flag is set to “Never Trust.”
28792882
2880- On Windows, the following certificates are currently trusted (unlike
2881- Chromium's policy, distrust is not currently supported):
2883+ On Windows, the following settings are respected (unlike Chromium's policy, distrust
2884+ and intermediate CA are not currently supported):
28822885
28832886* Local Machine (accessed via ` certlm.msc ` )
28842887 * Trust:
@@ -2893,8 +2896,19 @@ Chromium's policy, distrust is not currently supported):
28932896 * Trusted Root Certification Authorities
28942897 * Enterprise Trust -> Group Policy -> Trusted Root Certification Authorities
28952898
2896- On any supported system, Node.js would check that the certificate's key usage and extended key
2897- usage are consistent with TLS use cases before using it for server authentication.
2899+ On Windows and macOS, Node.js would check that the user settings for the certificates
2900+ do not forbid them for TLS server authentication before using them.
2901+
2902+ On other systems, Node.js loads certificates from the default certificate file
2903+ (typically ` /etc/ssl/cert.pem ` ) and default certificate directory (typically
2904+ ` /etc/ssl/certs ` ) that the version of OpenSSL that Node.js links to respects.
2905+ This typically works with the convention on major Linux distributions and other
2906+ Unix-like systems. If the overriding OpenSSL environment variables
2907+ (typically ` SSL_CERT_FILE ` and ` SSL_CERT_DIR ` , depending on the configuration
2908+ of the OpenSSL that Node.js links to) are set, the specified paths will be used to load
2909+ certificates instead. These environment variables can be used as workarounds
2910+ if the conventional paths used by the version of OpenSSL Node.js links to are
2911+ not consistent with the system configuration that the users have for some reason.
28982912
28992913### ` --v8-options `
29002914
@@ -3533,7 +3547,8 @@ variable is ignored.
35333547added: v7.7.0
35343548-->
35353549
3536- If ` --use-openssl-ca ` is enabled, this overrides and sets OpenSSL's directory
3550+ If ` --use-openssl-ca ` is enabled, or if ` --use-system-ca ` is enabled on
3551+ platforms other than macOS and Windows, this overrides and sets OpenSSL's directory
35373552containing trusted certificates.
35383553
35393554Be aware that unless the child environment is explicitly set, this environment
@@ -3546,7 +3561,8 @@ may cause them to trust the same CAs as node.
35463561added: v7.7.0
35473562-->
35483563
3549- If ` --use-openssl-ca ` is enabled, this overrides and sets OpenSSL's file
3564+ If ` --use-openssl-ca ` is enabled, or if ` --use-system-ca ` is enabled on
3565+ platforms other than macOS and Windows, this overrides and sets OpenSSL's file
35503566containing trusted certificates.
35513567
35523568Be aware that unless the child environment is explicitly set, this environment
0 commit comments