tls.getCertificateCompressionAlgorithms()
- 返回:<string[]>
返回一个数组,包含当前 OpenSSL 构建支持的 RFC 8879 证书压缩算法名称,可用于 tls.createSecureContext() 的 certificateCompression 选项。可能的值包括 'zlib'、'brotli' 和 'zstd'。
🌐 Returns an array with the names of the RFC 8879 certificate compression
algorithms supported by the current OpenSSL build, suitable for use in the
certificateCompression option of tls.createSecureContext(). Possible
values include 'zlib', 'brotli', and 'zstd'.
当证书压缩不可用时,数组是空的。
🌐 The array is empty when certificate compression is unavailable.
console.log(tls.getCertificateCompressionAlgorithms()); // ['zlib', 'brotli', 'zstd']