diff --git a/doc/api/tls.md b/doc/api/tls.md index 942733df8cc..c3b88429250 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -2541,6 +2541,25 @@ TLSv1.2 and below. console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] ``` +## `tls.getGroups()` + + + +* Returns: {string\[]} + +Returns an array with the names of the TLS groups that can be used in the +`ecdhCurve` option of [`tls.createSecureContext()`][] and in +[`tls.DEFAULT_ECDH_CURVE`][]. Not all supported groups are enabled by default. + +Requires OpenSSL 3.5 or later. Throws `ERR_CRYPTO_UNSUPPORTED_OPERATION` +otherwise. + +```js +console.log(tls.getGroups()); // ['MLKEM1024', 'MLKEM512', 'MLKEM768', ...] +``` + ## `tls.getCertificateCompressionAlgorithms()`