@@ -2838,12 +2838,15 @@ The following values are valid for `mode`:
2838
2838
### ` --use-system-ca `
2839
2839
2840
2840
Node.js uses the trusted CA certificates present in the system store along with
2841
- the ` --use-bundled-ca ` , ` --use-openssl-ca ` options.
2841
+ the ` --use-bundled-ca ` option and the ` NODE_EXTRA_CA_CERTS ` environment variable.
2842
+ On platforms other than Windows and macOS, this loads certificates from the directory
2843
+ and file trusted by OpenSSL, similar to ` --use-openssl-ca ` , with the difference being
2844
+ that it caches the certificates after first load.
2842
2845
2843
- This option is only supported on Windows and macOS, and the certificate trust policy
2844
- is planned to follow [ Chromium's policy for locally trusted certificates] [ ] :
2846
+ On Windows and macOS, the certificate trust policy is planned to follow
2847
+ [ Chromium's policy for locally trusted certificates] [ ] :
2845
2848
2846
- On macOS, the following certifcates are trusted :
2849
+ On macOS, the following settings are respected :
2847
2850
2848
2851
* Default and System Keychains
2849
2852
* Trust:
@@ -2853,8 +2856,8 @@ On macOS, the following certifcates are trusted:
2853
2856
* Any certificate where the “When using this certificate” flag is set to “Never Trust” or
2854
2857
* Any certificate where the “Secure Sockets Layer (SSL)” flag is set to “Never Trust.”
2855
2858
2856
- On Windows, the following certificates are currently trusted (unlike
2857
- Chromium's policy, distrust is not currently supported):
2859
+ On Windows, the following settings are respected (unlike Chromium's policy, distrust
2860
+ and intermediate CA are not currently supported):
2858
2861
2859
2862
* Local Machine (accessed via ` certlm.msc ` )
2860
2863
* Trust:
@@ -2869,8 +2872,19 @@ Chromium's policy, distrust is not currently supported):
2869
2872
* Trusted Root Certification Authorities
2870
2873
* Enterprise Trust -> Group Policy -> Trusted Root Certification Authorities
2871
2874
2872
- On any supported system, Node.js would check that the certificate's key usage and extended key
2873
- usage are consistent with TLS use cases before using it for server authentication.
2875
+ On Windows and macOS, Node.js would check that the user settings for the certificates
2876
+ do not forbid them for TLS server authentication before using them.
2877
+
2878
+ On other systems, Node.js loads certificates from the default certificate file
2879
+ (typically ` /etc/ssl/cert.pem ` ) and default certificate directory (typically
2880
+ ` /etc/ssl/certs ` ) that the version of OpenSSL that Node.js links to respects.
2881
+ This typically works with the convention on major Linux distributions and other
2882
+ Unix-like systems. If the overriding OpenSSL environment variables
2883
+ (typically ` SSL_CERT_FILE ` and ` SSL_CERT_DIR ` , depending on the configuration
2884
+ of the OpenSSL that Node.js links to) are set, the specified paths will be used to load
2885
+ certificates instead. These environment variables can be used as workarounds
2886
+ if the conventional paths used by the version of OpenSSL Node.js links to are
2887
+ not consistent with the system configuration that the users have for some reason.
2874
2888
2875
2889
### ` --v8-options `
2876
2890
@@ -3512,7 +3526,8 @@ variable is ignored.
3512
3526
added: v7.7.0
3513
3527
-->
3514
3528
3515
- If ` --use-openssl-ca ` is enabled, this overrides and sets OpenSSL's directory
3529
+ If ` --use-openssl-ca ` is enabled, or if ` --use-system-ca ` is enabled on
3530
+ platforms other than macOS and Windows, this overrides and sets OpenSSL's directory
3516
3531
containing trusted certificates.
3517
3532
3518
3533
Be aware that unless the child environment is explicitly set, this environment
@@ -3525,7 +3540,8 @@ may cause them to trust the same CAs as node.
3525
3540
added: v7.7.0
3526
3541
-->
3527
3542
3528
- If ` --use-openssl-ca ` is enabled, this overrides and sets OpenSSL's file
3543
+ If ` --use-openssl-ca ` is enabled, or if ` --use-system-ca ` is enabled on
3544
+ platforms other than macOS and Windows, this overrides and sets OpenSSL's file
3529
3545
containing trusted certificates.
3530
3546
3531
3547
Be aware that unless the child environment is explicitly set, this environment
0 commit comments