tls.getCiphers()
- 返回值: <string[]>
返回一个包含受支持的 TLS 加密套件名称的数组。这些名称由于历史原因为小写,但在用于 tls.createSecureContext() 的 ciphers 选项时必须大写。
🌐 Returns an array with the names of the supported TLS ciphers. The names are
lower-case for historical reasons, but must be uppercased to be used in
the ciphers option of tls.createSecureContext().
并非所有支持的密码算法默认都已启用。请参阅 修改默认的 TLS 密码套件。
🌐 Not all supported ciphers are enabled by default. See Modifying the default TLS cipher suite.
以 'tls_' 开头的加密套件名称用于 TLSv1.3,其他所有名称用于 TLSv1.2 及以下版本。
🌐 Cipher names that start with 'tls_' are for TLSv1.3, all the others are for
TLSv1.2 and below.
console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...]