To accompany --use-system-ca, this adds a new API that allows
querying various kinds of CA certificates.
- If the first argument `type` is `"default"` or undefined,
it returns the CA certificates that will be used by Node.js
TLS clients by default, which includes the Mozilla CA
if --use-bundled-ca is enabled or --use-openssl-ca is not
enabled, and the system certificates if --use-system-ca
is enabled, and the extra certificates if NODE_EXTRA_CA_CERTS
is used.
- If `type` is `"system"` this returns the system certificates,
regardless of whether --use-system-ca is enabeld or not.
- If `type` is `"bundled"` this is the same as `tls.rootCertificates`
and returns the Mozilla CA certificates.
- If `type` is `"extra"` this returns the certificates parsed
from the path specified by NODE_EXTRA_CA_CERTS.
Drive-by: remove the inaccurate description in `tls.rootCertificates`
about including system certificates, since it in fact does not include
them, and also it is contradicting the previous description about
`tls.rootCertificates` always returning the Mozilla CA store and
staying the same across platforms.
PR-URL: https://github.com/nodejs/node/pull/57107
Reviewed-By: James M Snell <jasnell@gmail.com>
For lint exceptions that are universal or near universal for
`test/common`, put the exceptions in a config file rather than disabling
the ESLint rules at the top of each file.
PR-URL: https://github.com/nodejs/node/pull/39358
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Make changes so that tests will pass when the comma-dangle settings
applied to the rest of the code base are also applied to tests.
PR-URL: https://github.com/nodejs/node/pull/37930
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Given the effort to change the master branch to main,
this may make sense as part of removing other references
to the offending wording as well.
Signed-off-by: Michael Dawson <mdawson@devrus.com>
PR-URL: https://github.com/nodejs/node/pull/36851
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>