Returns an array containing the CA certificates from various sources, depending on type
:
"default"
: return the CA certificates that will be used by the Node.js TLS clients by default.- When
--use-bundled-ca
is enabled (default), or--use-openssl-ca
is not enabled, this would include CA certificates from the bundled Mozilla CA store. - When
--use-system-ca
is enabled, this would also include certificates from the system's trusted store. - When
NODE_EXTRA_CA_CERTS
is used, this would also include certificates loaded from the specified file.
- When
"system"
: return the CA certificates that are loaded from the system's trusted store, according to rules set by--use-system-ca
. This can be used to get the certificates from the system when--use-system-ca
is not enabled."bundled"
: return the CA certificates from the bundled Mozilla CA store. This would be the same astls.rootCertificates
."extra"
: return the CA certificates loaded fromNODE_EXTRA_CA_CERTS
. It's an empty array ifNODE_EXTRA_CA_CERTS
is not set.