tls.rootCertificates


一个不可变的字符串数组,表示来自当前 Node.js 版本提供的打包 Mozilla CA 存储的根证书(PEM 格式)。

🌐 An immutable array of strings representing the root certificates (in PEM format) from the bundled Mozilla CA store as supplied by the current Node.js version.

由 Node.js 提供的打包 CA 证书库是 Mozilla CA 证书库在发布时的快照。在所有支持的平台上都是相同的。

🌐 The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store that is fixed at release time. It is identical on all supported platforms.

要获取当前 Node.js 实例使用的实际 CA 证书,这些证书可能包括从系统存储加载的证书(如果使用了 --use-system-ca)或从 NODE_EXTRA_CA_CERTS 指定的文件加载的证书,请使用 tls.getCACertificates()

🌐 To get the actual CA certificates used by the current Node.js instance, which may include certificates loaded from the system store (if --use-system-ca is used) or loaded from a file indicated by NODE_EXTRA_CA_CERTS, use tls.getCACertificates().