Skip to content

test: snicallback prioritization issue - #54251

Draft
Ethan-Arrowood wants to merge 1 commit into
nodejs:mainfrom
Ethan-Arrowood:snicallback-prioritization
Draft

test: snicallback prioritization issue#54251
Ethan-Arrowood wants to merge 1 commit into
nodejs:mainfrom
Ethan-Arrowood:snicallback-prioritization

Conversation

@Ethan-Arrowood

Copy link
Copy Markdown
Contributor

This PR contains a new test that demonstrates the issue I outlined in #54235

I really don't think there is anything wrong with Node.js - it feels to me like an OpenSSL thing. Most likely not a bug either, but an intended behavior where certain certificates are prioritized over others.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Aug 7, 2024
@codecov

codecov Bot commented Aug 7, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.11%. Comparing base (926503b) to head (b7afc71).
⚠️ Report is 2774 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54251      +/-   ##
==========================================
- Coverage   87.11%   87.11%   -0.01%     
==========================================
  Files         647      647              
  Lines      181693   181739      +46     
  Branches    34869    34885      +16     
==========================================
+ Hits       158278   158316      +38     
- Misses      16724    16731       +7     
- Partials     6691     6692       +1     

see 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Ethan-Arrowood
Ethan-Arrowood force-pushed the snicallback-prioritization branch from 604a1cf to e05c222 Compare August 7, 2024 21:25
Ethan-Arrowood added a commit to Ethan-Arrowood/node that referenced this pull request Aug 7, 2024
Depending on the content of a cert, it seems that OpenSSL
will prioritize the root cert over the context returned by
SNICallback. This behavior is unexpected. This PR adds a
test that demonstrates the behavior. Ideally there is a fix,
or a explanation for this behavior we can add to the docs.

Fixes: nodejs#54235
PR-URL: nodejs#54251
@Ethan-Arrowood
Ethan-Arrowood force-pushed the snicallback-prioritization branch from e05c222 to b7afc71 Compare August 7, 2024 21:27
@Ethan-Arrowood
Ethan-Arrowood marked this pull request as draft June 3, 2025 20:28
Depending on the content of a cert, it seems that OpenSSL
will prioritize the root cert over the context returned by
SNICallback. This behavior is unexpected. This PR adds a
test that demonstrates the behavior. Ideally there is a fix,
or a explanation for this behavior we can add to the docs.

Fixes: nodejs#54235
PR-URL: nodejs#54251
@Ethan-Arrowood
Ethan-Arrowood force-pushed the snicallback-prioritization branch from b7afc71 to fd1228f Compare August 14, 2025 01:41

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an error in the test. This line should read context: tls.createSecureContext(root) instead.

Currently, it doesn't affect the test result because the SNI callback will return an undefined context, causing it to use the default context which coincidentally mirrors the one created here.

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 the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants