Skip to content

Enable compression in OpenSSL and add opt-in certificate compression support for TLS connections#62217

Closed
pimterry wants to merge 7 commits into
nodejs:mainfrom
pimterry:openssl-compression
Closed

Enable compression in OpenSSL and add opt-in certificate compression support for TLS connections#62217
pimterry wants to merge 7 commits into
nodejs:mainfrom
pimterry:openssl-compression

Conversation

@pimterry

@pimterry pimterry commented Mar 11, 2026

Copy link
Copy Markdown
Member

EDIT: This diff size looks scary, but the vast majority is autogenerated from the build config update. Changes are now split into separate commits, all the auto-generated output is now in the 3rd commit, so the other parts can be reviewed more easily.

Until now, we've fully disabled all compression features in OpenSSL via no-comp. This PR:

  • Removes no-comp from our OpenSSL build, so we can use some compression features. This is required because OPENSSL_NO_COMP implies OPENSSL_NO_COMP_ALG, which disables certificate compression.
  • Links in our existing zlib, brotli & zstd implementations for the compression itself.
  • Adds a certificateCompression option for TLS contexts, exposing the OpenSSL API for certificate compression, defaulting to disabled (i.e. no visible change). We might want to enable this by default in future but we can debate that separately, no need to do so immediately I think. The new API throws an error if a non-empty option is passed when using a shared OpenSSL without compression support.

There's a lot of changes here but the vast majority (everything in deps/openssl/config/archs) are auto-generated based on the OpenSSL config changes and the actual source changes are quite simple.

This is my first time touching the OpenSSL dep setup directly, so hopefully I've rebuilt it correctly! Extra eyes there very helpful. Notably you can't actually rebuild directly on main via make gen-openssl right now, because /deps/openssl/openssl/test/ doesn't exist (removed since #57835). That's fine for OpenSSL dep updates (which pull the whole tree anyway) but it breaks simple regeneration. I just manually included the test dir locally, which seems to have rebuilt OK without changes. I'll open a separate PR to fix that properly later, but there's too many conflicts with the changes in here to open that at the same time. I've now added a commit to fix this here, adding no-tests to the OpenSSL config, you can now run make gen-openssl to regenerate manually and (nearly, except various timestamps) reproduce this commit yourself.

There's also a small test change required to the config for 3 unusual addon tests: on Mac only, directly linked our internal libopenssl.a into a shared library, without the rest of Node, which no longer works (because OpenSSL now references the compression libs). I don't think this is sensible or supported approach, I can't find any examples of this anywhere else, and these tests cover a feature (OpenSSL custom engines) which is deprecated and will be removed in OpenSSL v4 anyway. A small config change here updates them to instead dynamically look up symbols which should give the same result without issues.

Upsides:

  • This reduces certificate transfer size in handshakes significantly. In the example in the tests, total TLS handshake bytes shrinks 50%, even in minimal examples it should still be 15% or so.
  • That effect will get more significant in future with larger post-quantum certs and similar.
  • We'll probably want to enable this anyway for QUIC eventually, as limits there mean larger handshakes are a significant performance issue. I'm not an expert but my understanding: in TCP servers can generally send a 14KB response before hitting TCP congestion windows and waiting for a client ack. QUIC amplification protection meanwhile effectively gives a 3.6KB window until response, much smaller, and a server handshake message larger than that delays the whole connection setup for an extra RTT. That limit is very tight so compression is necessary to avoid extra RTs for many connections.
  • Reduces fingerprintability of Node.js traffic: all browser clients include the certificate compression extension in TLS client hellos, while Node does not, making TLS connections from Node trivially recognizable (so this helps support user-space solutions to Provide APIs to help control TLS fingerprints #41112).

Binary size

Since the compression libraries are already included in Node anyway, this is minimal: a standard Node build on my machine is 131MB, and increases 40KB (0.03%) with this addition.

Compression risks in TLS e.g. CRIME

No-comp was originally here in part to disable TLS record compression (compression during the connection itself, broken by CRIME). In this PR we're not enabling that, we're enabling certificate compression (how certs are transferred during the initial handshake only). There's no known vulnerabilities around certificate compression itself AFAIK, and it's enabled in all modern browsers and user-facing backends like NGINX, HAProxy, Envoy, etc so seems like a safe bet. This PR also keeps it disabled by default - it just becomes optionally available.

Record compression here is not enabled by this change, despite removing no-comp. It's independently disabled in many other ways:

  • OpenSSL disables record compression on all new contexts by default, unless explicitly enabled:
    /*
    * Disable compression by default to prevent CRIME. Applications can
    * re-enable compression by configuring
    * SSL_CTX_clear_options(ctx, SSL_OP_NO_COMPRESSION);
    * or by using the SSL_CONF library. Similarly we also enable TLSv1.3
    * middlebox compatibility by default. This may be disabled by default in
    * a later OpenSSL version.
    */
    ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
    (AFAICT we don't expose any capability to reset this option).
  • OpenSSL additionally fully disallows all use of record compression with security level 2+ anyway (our default from v24.5/v25+).
  • We independently disable all record compression options here:
    // Turn off compression. Saves memory and protects against CRIME attacks.
    // No-op with OPENSSL_NO_COMP builds of OpenSSL.
    sk_SSL_COMP_zero(SSL_COMP_get_compression_methods());
  • Record compression was completely removed from the protocol for TLS v1.3, so should be impossible to negotiate there in all scenarios even if we really really wanted to.

Removing it completely from the OpenSSL build as well was a nice extra protection, but it's not strictly required and blocks other unrelated TLS compression features.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. openssl Issues and PRs related to the OpenSSL dependency. labels Mar 11, 2026
@pimterry
pimterry force-pushed the openssl-compression branch 2 times, most recently from 536ac85 to b7d557b Compare March 12, 2026 12:26
@pimterry

Copy link
Copy Markdown
Member Author

Review from @nodejs/crypto also helpful. Although this is a deps change, it's primarily a TLS feature.

As noted in the description: the number of changes files is intimidating, but the vast vast majority are autogenerated updates! It's actually a fairly reasonable changeset 😄

@aduh95

aduh95 commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Could you split the deps/ changes to a separate commit so it's easier to review please?

@pimterry
pimterry force-pushed the openssl-compression branch from b7d557b to aee82a2 Compare March 12, 2026 17:24
@pimterry

Copy link
Copy Markdown
Member Author

@aduh95 Good idea. Now split into three commits: the first reconfigures the OpenSSL build, the 2nd contains all the auto-generated output from that, the 3rd contains the Node changes which use this to enable cert compression.

Comment thread src/crypto/crypto_context.cc
Comment thread src/crypto/crypto_context.h
Comment thread src/crypto/crypto_context.cc Outdated
@pimterry pimterry added the semver-minor PRs that contain new features and should be released in the next minor version. label Mar 14, 2026
@pimterry
pimterry requested review from addaleax and anonrig March 17, 2026 10:51
@pimterry

Copy link
Copy Markdown
Member Author

It would be great to keep this moving, as it's going to have some large & painful conflicts to resolve if there are any other OpenSSL changes in the meantime. Cert compression has some nice benefits, I'd love to get the option in for v26 next month.

Any other reviews from @nodejs/crypto or maybe @nodejs/net?

@panva

panva commented Mar 26, 2026

Copy link
Copy Markdown
Member

@pimterry this is not part of crypto that i can provide feedback/review for. Sorry.

@pimterry pimterry added the review wanted PRs that need reviews. label Mar 31, 2026
@pimterry
pimterry force-pushed the openssl-compression branch from dc67a6f to 867a64a Compare May 22, 2026 09:27
@pimterry pimterry added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label May 22, 2026
@pimterry

Copy link
Copy Markdown
Member Author

Now updated. I've:

  • Added a commit which adds no-tests to the OpenSSL build config. Without this, make gen-openssl fails on main - it only works during the process of a full OpenSSL update, because we git ignore the tests afterwards. No downside to this I think - it's just skipping configuring test code builds that we don't use.
  • Rebuilt the OpenSSL sources.
  • Rebased & squashed the cert compression commit
  • Updated the intermediate change messages to fixup! and added the rebase label, to land the TLS & deps changes as separate lines in the changelog.

That means there's 4 commits to review:

  • Enabling compression in OpenSSL build config (50 line change)
  • (as a fixup) Adding no-tests to OpenSSL build config (2 line change)
  • (as a fixup) Rebuilding OpenSSL (many thousands of lines - but reproducible with make gen-openssl)
  • Exposing a new certificateCompression option for TLS (a couple of hundred lines)

@jasnell can you take a look at this? This is useful for TLS generally, but specifically solves the large certificates problem for QUIC you're listing in the docs, by enabling certificate compression so we can avoid handshake round trips. This has been sat open for a while, but worth prioritising for QUIC imo. Disabled by default here for normal TLS so it's optional & definitely non-breaking, but once it's merged we could test out enabling it by default in QUIC contexts.

@jasnell

jasnell commented May 22, 2026

Copy link
Copy Markdown
Member

Yeah, I've been meaning to come back to this. Record-level compression has long been actively problematic due to CRIME and similar types of exploits. Certificate-compression should be fine but last I checked openssl was gating both behind the same flag. As long as we're certain that enabling this won't accidentally enable record-level compression, then I'm all for it.

Comment thread src/crypto/crypto_context.cc
Comment thread src/crypto/crypto_context.cc Outdated
Comment thread src/crypto/crypto_context.cc Outdated
Comment thread src/crypto/crypto_context.cc
Comment thread src/crypto/crypto_context.cc Outdated
Comment thread src/crypto/crypto_context.cc Outdated
Comment thread test/parallel/test-tls-certificate-compression.js Outdated
pimterry added a commit that referenced this pull request Jun 19, 2026
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
pimterry added a commit that referenced this pull request Jun 19, 2026
This changes enables compression within OpenSSL *without* enabling
record compression, so this only affects compression of certificates
delivered within the TLS handshake. This certificate compression remains
disabled by default for now, but becomes available via the new
certificateCompression option in TLS context APIs.

Enabling this shrinks handshakes significantly, and also reduces
fingerprintability of Node.js client handshakes, as these are enabled in
all modern browsers by default.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@pimterry

Copy link
Copy Markdown
Member Author

Landed in 21310cb...e52ec44

@pimterry pimterry closed this Jun 19, 2026
aduh95 pushed a commit that referenced this pull request Jun 20, 2026
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Jun 20, 2026
This changes enables compression within OpenSSL *without* enabling
record compression, so this only affects compression of certificates
delivered within the TLS handshake. This certificate compression remains
disabled by default for now, but becomes available via the new
certificateCompression option in TLS context APIs.

Enabling this shrinks handshakes significantly, and also reduces
fingerprintability of Node.js client handshakes, as these are enabled in
all modern browsers by default.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
nodejs-github-bot added a commit that referenced this pull request Jun 22, 2026
Notable changes:

build, doc:
  * generate node.1 with doc-kit (Aviv Keller) #62044
deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) #62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) #63050
fs:
  * (SEMVER-MINOR) support caller-supplied readFile() buffers (Matteo Collina) #63634
http:
  * (SEMVER-MINOR) close pre-request sockets in closeIdleConnections (semimikoh) #63470
loader:
  * (SEMVER-MINOR) implement package maps (Maël Nison) #62239
net:
  * (SEMVER-MINOR) support TCP_KEEPINTVL and TCP_KEEPCNT in setKeepAlive (Guy Bedford) #63825
tls:
  * (SEMVER-MINOR) add certificateCompression option (Tim Perry) #62217
vfs:
  * (SEMVER-MINOR) dispatch fs/promises to mounted VFS instances (Matteo Collina) #63537
  * (SEMVER-MINOR) add minimal node:vfs subsystem (Matteo Collina) #63115

PR-URL: #64058
aduh95 added a commit that referenced this pull request Jun 23, 2026
Notable changes:

deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) #62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) #63050
fs:
  * (SEMVER-MINOR) support caller-supplied `readFile()` buffers (Matteo Collina) #63634
http:
  * (SEMVER-MINOR) close pre-request sockets in `closeIdleConnections` (semimikoh) #63470
loader:
  * (SEMVER-MINOR) implement package maps (Maël Nison) #62239
net:
  * (SEMVER-MINOR) support `TCP_KEEPINTVL` and `TCP_KEEPCNT` in `setKeepAlive` (Guy Bedford) #63825
tls:
  * (SEMVER-MINOR) add `certificateCompression` option (Tim Perry) #62217
vfs:
  * (SEMVER-MINOR) dispatch `node:fs/promises` to mounted VFS instances (Matteo Collina) #63537
  * (SEMVER-MINOR) add minimal `node:vfs` subsystem (Matteo Collina) #63115

PR-URL: #64058
aduh95 added a commit that referenced this pull request Jun 24, 2026
Notable changes:

deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) #62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) #63050
fs:
  * (SEMVER-MINOR) support caller-supplied `readFile()` buffers (Matteo Collina) #63634
http:
  * (SEMVER-MINOR) close pre-request sockets in `closeIdleConnections` (semimikoh) #63470
loader:
  * (SEMVER-MINOR) implement package maps (Maël Nison) #62239
net:
  * (SEMVER-MINOR) support `TCP_KEEPINTVL` and `TCP_KEEPCNT` in `setKeepAlive` (Guy Bedford) #63825
tls:
  * (SEMVER-MINOR) add `certificateCompression` option (Tim Perry) #62217
vfs:
  * (SEMVER-MINOR) dispatch `node:fs/promises` to mounted VFS instances (Matteo Collina) #63537
  * (SEMVER-MINOR) add minimal `node:vfs` subsystem (Matteo Collina) #63115

PR-URL: #64058
luanmuniz pushed a commit to luanmuniz/node that referenced this pull request Jun 25, 2026
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: nodejs#62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
luanmuniz pushed a commit to luanmuniz/node that referenced this pull request Jun 25, 2026
This changes enables compression within OpenSSL *without* enabling
record compression, so this only affects compression of certificates
delivered within the TLS handshake. This certificate compression remains
disabled by default for now, but becomes available via the new
certificateCompression option in TLS context APIs.

Enabling this shrinks handshakes significantly, and also reduces
fingerprintability of Node.js client handshakes, as these are enabled in
all modern browsers by default.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: nodejs#62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
luanmuniz pushed a commit to luanmuniz/node that referenced this pull request Jun 25, 2026
Notable changes:

deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) nodejs#62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) nodejs#63050
fs:
  * (SEMVER-MINOR) support caller-supplied `readFile()` buffers (Matteo Collina) nodejs#63634
http:
  * (SEMVER-MINOR) close pre-request sockets in `closeIdleConnections` (semimikoh) nodejs#63470
loader:
  * (SEMVER-MINOR) implement package maps (Maël Nison) nodejs#62239
net:
  * (SEMVER-MINOR) support `TCP_KEEPINTVL` and `TCP_KEEPCNT` in `setKeepAlive` (Guy Bedford) nodejs#63825
tls:
  * (SEMVER-MINOR) add `certificateCompression` option (Tim Perry) nodejs#62217
vfs:
  * (SEMVER-MINOR) dispatch `node:fs/promises` to mounted VFS instances (Matteo Collina) nodejs#63537
  * (SEMVER-MINOR) add minimal `node:vfs` subsystem (Matteo Collina) nodejs#63115

PR-URL: nodejs#64058
aduh95 pushed a commit that referenced this pull request Jun 25, 2026
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Jun 25, 2026
This changes enables compression within OpenSSL *without* enabling
record compression, so this only affects compression of certificates
delivered within the TLS handshake. This certificate compression remains
disabled by default for now, but becomes available via the new
certificateCompression option in TLS context APIs.

Enabling this shrinks handshakes significantly, and also reduces
fingerprintability of Node.js client handshakes, as these are enabled in
all modern browsers by default.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
nodejs-github-bot added a commit that referenced this pull request Jul 21, 2026
Notable changes:

buffer:
  * (SEMVER-MINOR) implement blob.textStream() (Matthew Aitken) #64036
deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) #62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) #63050
  * mark stream.compose stable (Matteo Collina) #62562
esm:
  * (SEMVER-MINOR) add `--experimental-import-text` flag (Efe) #62300
fs:
  * (SEMVER-MINOR) support caller-supplied readFile() buffers (Matteo Collina) #63634
http:
  * (SEMVER-MINOR) add httpValidation option to configure header value validation (RajeshKumar11) #61597
net:
  * (SEMVER-MINOR) support TCP_KEEPINTVL and TCP_KEEPCNT in setKeepAlive (Guy Bedford) #63825
stream:
  * (SEMVER-MINOR) expose ReadableStreamTee (Matteo Collina) #64195
tls:
  * (SEMVER-MINOR) report negotiated TLS groups (Filip Skokan) #64119
  * (SEMVER-MINOR) add certificateCompression option (Tim Perry) #62217

PR-URL: #64654
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
This changes enables compression within OpenSSL *without* enabling
record compression, so this only affects compression of certificates
delivered within the TLS handshake. This certificate compression remains
disabled by default for now, but becomes available via the new
certificateCompression option in TLS context APIs.

Enabling this shrinks handshakes significantly, and also reduces
fingerprintability of Node.js client handshakes, as these are enabled in
all modern browsers by default.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 added a commit that referenced this pull request Jul 21, 2026
Notable changes:

buffer:
  * (SEMVER-MINOR) implement `blob.textStream()` (Matthew Aitken) #64036
deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) #62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) #63050
  * mark `stream.compose` stable (Matteo Collina) #62562
esm:
  * (SEMVER-MINOR) add `--experimental-import-text` flag (Efe) #62300
fs:
  * (SEMVER-MINOR) support caller-supplied `readFile()` buffers (Matteo Collina) #63634
http:
  * (SEMVER-MINOR) add `httpValidation` option to configure header value validation (RajeshKumar11) #61597
net:
  * (SEMVER-MINOR) support `TCP_KEEPINTVL` and `TCP_KEEPCNT` in setKeepAlive (Guy Bedford) #63825
perf_hooks:
  * (SEMVER-MINOR) sample delay per event loop iteration (Pablo Erhard) #62935
stream:
  * (SEMVER-MINOR) expose `ReadableStreamTee` (Matteo Collina) #64195
tls:
  * (SEMVER-MINOR) report negotiated TLS groups (Filip Skokan) #64119
  * (SEMVER-MINOR) add `certificateCompression` option (Tim Perry) #62217

PR-URL: #64654
aduh95 added a commit that referenced this pull request Jul 21, 2026
Notable changes:

buffer:
  * (SEMVER-MINOR) implement `blob.textStream()` (Matthew Aitken) #64036
deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) #62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) #63050
  * mark `stream.compose` stable (Matteo Collina) #62562
esm:
  * (SEMVER-MINOR) add `--experimental-import-text` flag (Efe) #62300
fs:
  * (SEMVER-MINOR) support caller-supplied `readFile()` buffers (Matteo Collina) #63634
http:
  * (SEMVER-MINOR) add `httpValidation` option to configure header value validation (RajeshKumar11) #61597
net:
  * (SEMVER-MINOR) support `TCP_KEEPINTVL` and `TCP_KEEPCNT` in setKeepAlive (Guy Bedford) #63825
perf_hooks:
  * (SEMVER-MINOR) sample delay per event loop iteration (Pablo Erhard) #62935
src:
  * (SEMVER-MINOR) allow empty `--experimental-config-file` (Marco Ippolito) #61610
stream:
  * (SEMVER-MINOR) expose `ReadableStreamTee` (Matteo Collina) #64195
tls:
  * (SEMVER-MINOR) report negotiated TLS groups (Filip Skokan) #64119
  * (SEMVER-MINOR) add `certificateCompression` option (Tim Perry) #62217

PR-URL: #64654
aduh95 pushed a commit to aduh95/node that referenced this pull request Jul 22, 2026
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: nodejs#62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit to aduh95/node that referenced this pull request Jul 22, 2026
This changes enables compression within OpenSSL *without* enabling
record compression, so this only affects compression of certificates
delivered within the TLS handshake. This certificate compression remains
disabled by default for now, but becomes available via the new
certificateCompression option in TLS context APIs.

Enabling this shrinks handshakes significantly, and also reduces
fingerprintability of Node.js client handshakes, as these are enabled in
all modern browsers by default.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: nodejs#62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 22, 2026
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 22, 2026
This changes enables compression within OpenSSL *without* enabling
record compression, so this only affects compression of certificates
delivered within the TLS handshake. This certificate compression remains
disabled by default for now, but becomes available via the new
certificateCompression option in TLS context APIs.

Enabling this shrinks handshakes significantly, and also reduces
fingerprintability of Node.js client handshakes, as these are enabled in
all modern browsers by default.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: #62217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 added a commit that referenced this pull request Jul 22, 2026
Notable changes:

buffer:
  * (SEMVER-MINOR) implement `blob.textStream()` (Matthew Aitken) #64036
deps:
  * (SEMVER-MINOR) update OpenSSL build config to support compression (Tim Perry) #62217
doc:
  * (SEMVER-MINOR) update `blockList` stability status to release candidate (alphaleadership) #63050
  * mark `stream.compose` stable (Matteo Collina) #62562
esm:
  * (SEMVER-MINOR) add `--experimental-import-text` flag (Efe) #62300
fs:
  * (SEMVER-MINOR) support caller-supplied `readFile()` buffers (Matteo Collina) #63634
http:
  * (SEMVER-MINOR) add `httpValidation` option to configure header value validation (RajeshKumar11) #61597
net:
  * (SEMVER-MINOR) support `TCP_KEEPINTVL` and `TCP_KEEPCNT` in setKeepAlive (Guy Bedford) #63825
perf_hooks:
  * (SEMVER-MINOR) sample delay per event loop iteration (Pablo Erhard) #62935
src:
  * (SEMVER-MINOR) allow empty `--experimental-config-file` (Marco Ippolito) #61610
stream:
  * (SEMVER-MINOR) expose `ReadableStreamTee` (Matteo Collina) #64195
tls:
  * (SEMVER-MINOR) report negotiated TLS groups (Filip Skokan) #64119
  * (SEMVER-MINOR) add `certificateCompression` option (Tim Perry) #62217

PR-URL: #64654
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jul 22, 2026
OpenSSL allocates the built-in record-compression methods while creating
its global context. Clearing the stack drops the only pointers without
freeing the entries, so LeakSanitizer reports a 24-byte leak at process
shutdown.

OpenSSL disables record compression on every new SSL_CTX by default.
Node does not expose SSL_CTX_clear_options(), so the extra process-wide
clearing is not needed to protect against CRIME.

Refs: nodejs#62217
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. dependencies Pull requests that update a dependency file. large-pr needs-ci PRs that need a full CI run. openssl Issues and PRs related to the OpenSSL dependency. review wanted PRs that need reviews. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants