getCACertificates
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-cais enabled (default), or--use-openssl-cais not enabled, this would include CA certificates from the bundled Mozilla CA store.When
--use-system-cais enabled, this would also include certificates from the system's trusted store.When
NODE_EXTRA_CA_CERTSis used, this would also include certificates loaded from the specified file."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-cais 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_CERTSis not set.
Since
v22.15.0
Parameters
The type of CA certificates that will be returned. Valid values are "default", "system", "bundled" and "extra". Default: "default".