Skip to content

[v22.x backport] test: account for varied OpenSSL CCM final behaviours - #65711

Open
everett1992 wants to merge 1 commit into
nodejs:v22.x-stagingfrom
everett1992:backport-65542-to-v22.x
Open

[v22.x backport] test: account for varied OpenSSL CCM final behaviours#65711
everett1992 wants to merge 1 commit into
nodejs:v22.x-stagingfrom
everett1992:backport-65542-to-v22.x

Conversation

@everett1992

@everett1992 everett1992 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Backport of test: account for varied OpenSSL CCM final behaviours
(28b571c) from #65542, which landed via commit-queue-rebase, so the
test fix is one commit inside the OpenSSL 3.5.8 update rather than its own
PR.

It does not cherry-pick cleanly: main has hasOpenSSL(3) where this
branch still has hasOpenSSL3, and the block is not wrapped in an
if (!ciphers.includes('aes-128-ccm')) guard on this branch
(indentation only).

Why now

We build our Node distribution against our own OpenSSL rather than the
bundled copy, and we run the upstream test suite. We have just updated to
OpenSSL 3.0.22 (for v20.x/v22.x) and 3.5.8 (for v24.x/v26.x), so
parallel/test-crypto-authenticated is already failing on our v22.x and
v24.x builds. The same backport will be needed here if and when these
branches update the bundled OpenSSL.

OpenSSL 3.0.22 and 3.5.8 include openssl/openssl#32427. Before it,
ossl_ccm_stream_final() returned early when the payload update() was
skipped, so encryption produced no tag and decryption could report
success without verifying the supplied tag. With the fix, final() on an
empty CCM message succeeds and produces a real tag instead of failing
with ERR_OSSL_TAG_NOT_SET — which is what the test asserted
unconditionally.

Verification

Ran parallel/test-crypto-authenticated before and after this change on
Node 22.23.2 built against shared OpenSSL 3.0.22: fails before, passes
after. Also confirmed on 20.20.2 (OpenSSL 3.0.22) and 26.7.0 (OpenSSL
3.5.8).

AI disclosure

The conflict resolution and this description were drafted with an
agentic coding CLI. I ran the test before and after on the builds above
and read the OpenSSL change to confirm the behaviour it describes.

Companion backport for v24.x: #65710

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. v22.x Issues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch. labels Sep 1, 2026
@everett1992
everett1992 force-pushed the backport-65542-to-v22.x branch from c3fbbe0 to 25fc16c Compare September 1, 2026 16:36
everett1992 pushed a commit to everett1992/node that referenced this pull request Sep 1, 2026
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: nodejs#65542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
(cherry picked from commit 28b571c)

Refs: openssl/openssl#32427
Refs: nodejs#65710
Refs: nodejs#65711
everett1992 pushed a commit to everett1992/node that referenced this pull request Sep 1, 2026
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: nodejs#65542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
(cherry picked from commit 28b571c)

Refs: openssl/openssl#32427
Refs: nodejs#65711
Refs: nodejs#65710
Backport of the test-only commit from nodejs#65542. Distributions that build
Node against their own newer OpenSSL and run the upstream test suite
already see this test fail on v22.x and v24.x. The same backport is
needed if and when these lines update the bundled OpenSSL.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Signed-off-by: Caleb ツ Everett <calebev@amazon.com>
PR-URL: nodejs#65542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
(cherry picked from commit 28b571c)
Refs: openssl/openssl#32427
Refs: nodejs#65710
Refs: nodejs#65711
Assisted-by: a closed-source coding agent
@everett1992
everett1992 force-pushed the backport-65542-to-v22.x branch from 25fc16c to 557875b Compare September 1, 2026 17:00
everett1992 pushed a commit to everett1992/node that referenced this pull request Sep 1, 2026
Backport of the test-only commit from nodejs#65542. Distributions that build
Node against their own newer OpenSSL and run the upstream test suite
already see this test fail on v22.x and v24.x. The same backport is
needed if and when these lines update the bundled OpenSSL.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Signed-off-by: Caleb ツ Everett <calebev@amazon.com>
PR-URL: nodejs#65542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
(cherry picked from commit 28b571c)
Refs: openssl/openssl#32427
Refs: nodejs#65710
Refs: nodejs#65711
Assisted-by: a closed-source coding agent
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2026
@trivikr
trivikr requested a review from panva September 1, 2026 23:28
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. v22.x Issues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants