@@ -2868,12 +2868,15 @@ The following values are valid for `mode`:
2868
2868
### ` --use-system-ca `
2869
2869
2870
2870
Node.js uses the trusted CA certificates present in the system store along with
2871
- the ` --use-bundled-ca ` , ` --use-openssl-ca ` options.
2871
+ the ` --use-bundled-ca ` option and the ` NODE_EXTRA_CA_CERTS ` environment variable.
2872
+ On platforms other than Windows and macOS, this loads certificates from the directory
2873
+ and file trusted by OpenSSL, similar to ` --use-openssl-ca ` , with the difference being
2874
+ that it caches the certificates after first load.
2872
2875
2873
- This option is only supported on Windows and macOS, and the certificate trust policy
2874
- is planned to follow [ Chromium's policy for locally trusted certificates] [ ] :
2876
+ On Windows and macOS, the certificate trust policy is planned to follow
2877
+ [ Chromium's policy for locally trusted certificates] [ ] :
2875
2878
2876
- On macOS, the following certifcates are trusted :
2879
+ On macOS, the following settings are respected :
2877
2880
2878
2881
* Default and System Keychains
2879
2882
* Trust:
@@ -2883,8 +2886,8 @@ On macOS, the following certifcates are trusted:
2883
2886
* Any certificate where the “When using this certificate” flag is set to “Never Trust” or
2884
2887
* Any certificate where the “Secure Sockets Layer (SSL)” flag is set to “Never Trust.”
2885
2888
2886
- On Windows, the following certificates are currently trusted (unlike
2887
- Chromium's policy, distrust is not currently supported):
2889
+ On Windows, the following settings are respected (unlike Chromium's policy, distrust
2890
+ and intermediate CA are not currently supported):
2888
2891
2889
2892
* Local Machine (accessed via ` certlm.msc ` )
2890
2893
* Trust:
@@ -2899,8 +2902,19 @@ Chromium's policy, distrust is not currently supported):
2899
2902
* Trusted Root Certification Authorities
2900
2903
* Enterprise Trust -> Group Policy -> Trusted Root Certification Authorities
2901
2904
2902
- On any supported system, Node.js would check that the certificate's key usage and extended key
2903
- usage are consistent with TLS use cases before using it for server authentication.
2905
+ On Windows and macOS, Node.js would check that the user settings for the certificates
2906
+ do not forbid them for TLS server authentication before using them.
2907
+
2908
+ On other systems, Node.js loads certificates from the default certificate file
2909
+ (typically ` /etc/ssl/cert.pem ` ) and default certificate directory (typically
2910
+ ` /etc/ssl/certs ` ) that the version of OpenSSL that Node.js links to respects.
2911
+ This typically works with the convention on major Linux distributions and other
2912
+ Unix-like systems. If the overriding OpenSSL environment variables
2913
+ (typically ` SSL_CERT_FILE ` and ` SSL_CERT_DIR ` , depending on the configuration
2914
+ of the OpenSSL that Node.js links to) are set, the specified paths will be used to load
2915
+ certificates instead. These environment variables can be used as workarounds
2916
+ if the conventional paths used by the version of OpenSSL Node.js links to are
2917
+ not consistent with the system configuration that the users have for some reason.
2904
2918
2905
2919
### ` --v8-options `
2906
2920
@@ -3541,7 +3555,8 @@ variable is ignored.
3541
3555
added: v7.7.0
3542
3556
-->
3543
3557
3544
- If ` --use-openssl-ca ` is enabled, this overrides and sets OpenSSL's directory
3558
+ If ` --use-openssl-ca ` is enabled, or if ` --use-system-ca ` is enabled on
3559
+ platforms other than macOS and Windows, this overrides and sets OpenSSL's directory
3545
3560
containing trusted certificates.
3546
3561
3547
3562
Be aware that unless the child environment is explicitly set, this environment
@@ -3554,7 +3569,8 @@ may cause them to trust the same CAs as node.
3554
3569
added: v7.7.0
3555
3570
-->
3556
3571
3557
- If ` --use-openssl-ca ` is enabled, this overrides and sets OpenSSL's file
3572
+ If ` --use-openssl-ca ` is enabled, or if ` --use-system-ca ` is enabled on
3573
+ platforms other than macOS and Windows, this overrides and sets OpenSSL's file
3558
3574
containing trusted certificates.
3559
3575
3560
3576
Be aware that unless the child environment is explicitly set, this environment
0 commit comments