Skip to content

Conversation

@joyeecheung
Copy link
Member

When decoding certificates from the system store, it's not actually guaranteed to succeed. In case the system returns a certificate that cannot be decoded (might be related to SSL implementation issues), skip them.

Refs: microsoft/vscode#277064

When decoding certificates from the system store, it's not actually
guaranteed to succeed. In case the system returns a certificate
that cannot be decoded (might be related to SSL implementation issues),
skip them.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Nov 20, 2025
"Cannot read certificates from system because "
"SecItemCopyMatching failed %d\n",
ortn);
return;
Copy link
Member Author

@joyeecheung joyeecheung Nov 20, 2025

Choose a reason for hiding this comment

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

Drive-by: I added a skip here too, otherwise the code operating on that array below can crash (I think it's possible on a super duper fresh machine with zero certificates, for example - though most consumer macOS machines seem to have at least some preinstalled, or when there's some permission issue going on)

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 20, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 20, 2025
@nodejs-github-bot
Copy link
Collaborator

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (0b6ae6d) to head (8bb2f41).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60787      +/-   ##
==========================================
+ Coverage   88.04%   88.53%   +0.49%     
==========================================
  Files         703      703              
  Lines      208260   208260              
  Branches    40068    40149      +81     
==========================================
+ Hits       183360   184393    +1033     
+ Misses      16840    15878     -962     
+ Partials     8060     7989      -71     
Files with missing lines Coverage Δ
src/crypto/crypto_context.cc 68.50% <ø> (ø)

... and 100 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.

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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants