diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index a2248e7a565..4e16412a028 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -19,11 +19,6 @@ { 'target_name': 'openssl', 'type': '<(library)', - 'dependencies': [ - '../zlib/zlib.gyp:zlib', - '../brotli/brotli.gyp:brotli', - '../zstd/zstd.gyp:zstd', - ], 'includes': ['./openssl_common.gypi'], 'defines': [ # Compile out hardware engines. Most are stubs that dynamically load @@ -54,6 +49,15 @@ 'MODULESDIR="<(modules_dir)"', ] }], + ['node_shared_zlib=="false"', { + 'dependencies': [ '../zlib/zlib.gyp:zlib' ], + }], + ['node_shared_brotli=="false"', { + 'dependencies': [ '../brotli/brotli.gyp:brotli' ], + }], + ['node_shared_zstd=="false"', { + 'dependencies': [ '../zstd/zstd.gyp:zstd' ], + }], ], 'direct_dependent_settings': { 'include_dirs': [ 'openssl/include', 'openssl/crypto/include'] diff --git a/doc/api/tls.md b/doc/api/tls.md index 0fed13e2ee5..e2231c65448 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1895,6 +1895,9 @@ argument. + +* Returns: {string\[]} + +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. + +```js +console.log(tls.getCertificateCompressionAlgorithms()); // ['zlib', 'brotli', 'zstd'] +``` + ## `tls.rootCertificates`