@@ -2862,12 +2862,15 @@ The following values are valid for `mode`:
2862
2862
### ` --use-system-ca `
2863
2863
2864
2864
Node.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.
2866
2869
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] [ ] :
2869
2872
2870
- On macOS, the following certifcates are trusted :
2873
+ On macOS, the following settings are respected :
2871
2874
2872
2875
* Default and System Keychains
2873
2876
* Trust:
@@ -2877,8 +2880,8 @@ On macOS, the following certifcates are trusted:
2877
2880
* Any certificate where the “When using this certificate” flag is set to “Never Trust” or
2878
2881
* Any certificate where the “Secure Sockets Layer (SSL)” flag is set to “Never Trust.”
2879
2882
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):
2882
2885
2883
2886
* Local Machine (accessed via ` certlm.msc ` )
2884
2887
* Trust:
@@ -2893,8 +2896,19 @@ Chromium's policy, distrust is not currently supported):
2893
2896
* Trusted Root Certification Authorities
2894
2897
* Enterprise Trust -> Group Policy -> Trusted Root Certification Authorities
2895
2898
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.
2898
2912
2899
2913
### ` --v8-options `
2900
2914
@@ -3533,7 +3547,8 @@ variable is ignored.
3533
3547
added: v7.7.0
3534
3548
-->
3535
3549
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
3537
3552
containing trusted certificates.
3538
3553
3539
3554
Be 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.
3546
3561
added: v7.7.0
3547
3562
-->
3548
3563
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
3550
3566
containing trusted certificates.
3551
3567
3552
3568
Be aware that unless the child environment is explicitly set, this environment
0 commit comments