Commit 305c97b3ba0 for nodejs

commit 305c97b3ba0921be07cda75dfe4d1ccea913640e
Author: Chengzhong Wu <legendecas@gmail.com>
Date:   Sun Nov 29 23:26:31 2026 +0800

    doc: deprecate `tls.rootCertificates`

    Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
    PR-URL: https://github.com/nodejs/node/pull/67827
    Reviewed-By: Richard Lau <richard.lau@ibm.com>
    Reviewed-By: Tim Perry <pimterry@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>

diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index b6688ba20a6..cd71dff0a01 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -4946,6 +4946,23 @@ This affects multiple TLS APIs:
   If renegotiation by clients is removed in future these are likely to be
   removed.

+### DEP0214: `tls.rootCertificates`
+
+<!-- YAML
+changes:
+  - version: REPLACEME
+    pr-url: https://github.com/nodejs/node/pull/67827
+    description: Documentation-only deprecation.
+-->
+
+Type: Documentation-only
+
+[`tls.rootCertificates`][] only holds the bundled Mozilla CA store. It doesn't
+reflect the CA certificates that Node.js TLS clients use by default, such as
+certificates added with [`--use-system-ca`][] or [`NODE_EXTRA_CA_CERTS`][].
+Use [`tls.getCACertificates('default')`][] to get the default CA certificates,
+or `tls.getCACertificates('bundled')` to get the bundled Mozilla CA store.
+
 [DEP0142]: #dep0142-repl_builtinlibs
 [DEP0156]: #dep0156-aborted-property-and-abort-aborted-event-in-http
 [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
@@ -4959,6 +4976,7 @@ This affects multiple TLS APIs:
 [`--pending-deprecation`]: cli.md#--pending-deprecation
 [`--throw-deprecation`]: cli.md#--throw-deprecation
 [`--unhandled-rejections`]: cli.md#--unhandled-rejectionsmode
+[`--use-system-ca`]: cli.md#--use-system-ca
 [`Buffer.allocUnsafeSlow(size)`]: buffer.md#static-method-bufferallocunsafeslowsize-alignment
 [`Buffer.from(array)`]: buffer.md#static-method-bufferfromarray
 [`Buffer.from(buffer)`]: buffer.md#static-method-bufferfrombuffer
@@ -4971,6 +4989,7 @@ This affects multiple TLS APIs:
 [`ERR_INVALID_PACKAGE_TARGET`]: errors.md#err_invalid_package_target
 [`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError
 [`KeyObject.from()`]: crypto.md#static-method-keyobjectfromkey
+[`NODE_EXTRA_CA_CERTS`]: cli.md#node_extra_ca_certsfile
 [`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand
 [`ReadStream.open()`]: fs.md#class-fsreadstream
 [`Server.getConnections()`]: net.md#servergetconnectionscallback
@@ -5076,6 +5095,8 @@ This affects multiple TLS APIs:
 [`tls.connect()`]: tls.md#tlsconnectoptions-callback
 [`tls.createSecureContext()`]: tls.md#tlscreatesecurecontextoptions
 [`tls.createServer()`]: tls.md#tlscreateserveroptions-secureconnectionlistener
+[`tls.getCACertificates('default')`]: tls.md#tlsgetcacertificatestype
+[`tls.rootCertificates`]: tls.md#tlsrootcertificates
 [`tlsSocket.disableRenegotiation()`]: tls.md#tlssocketdisablerenegotiation
 [`tlsSocket.renegotiate()`]: tls.md#tlssocketrenegotiateoptions-callback
 [`url.format()`]: url.md#urlformaturlobject
diff --git a/doc/api/tls.md b/doc/api/tls.md
index e8b34f21570..2ffa975d0b3 100644
--- a/doc/api/tls.md
+++ b/doc/api/tls.md
@@ -2564,8 +2564,12 @@ console.log(tls.getCertificateCompressionAlgorithms()); // ['zlib', 'brotli', 'z

 <!-- YAML
 added: v12.3.0
+deprecated: REPLACEME
 -->

+> Stability: 0 - Deprecated. Use [`tls.getCACertificates()`][] instead.
+> See [DEP0214][].
+
 * Type: {string\[]}

 An immutable array of strings representing the root certificates (in PEM format)
@@ -2638,6 +2642,7 @@ added: v0.11.3
 [CVE-2021-44531]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531
 [Chrome's 'modern cryptography' setting]: https://www.chromium.org/Home/chromium-security/education/tls#TOC-Cipher-Suites
 [DEP0213]: deprecations.md#dep0213-tls-renegotiation
+[DEP0214]: deprecations.md#dep0214-tlsrootcertificates
 [DHE]: https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
 [ECDHE]: https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman
 [IANA TLS Supported Groups registry]: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8