src: enable X509sToArrayOfStrings to skip errors#61784
Open
StefanStojanovic wants to merge 3 commits intonodejs:mainfrom
Open
src: enable X509sToArrayOfStrings to skip errors#61784StefanStojanovic wants to merge 3 commits intonodejs:mainfrom
StefanStojanovic wants to merge 3 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
4801d72 to
88ad793
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61784 +/- ##
==========================================
- Coverage 89.73% 89.69% -0.04%
==========================================
Files 675 672 -3
Lines 204674 204549 -125
Branches 39330 39274 -56
==========================================
- Hits 183667 183480 -187
- Misses 13283 13383 +100
+ Partials 7724 7686 -38
🚀 New features to boost your workflow:
|
addaleax
reviewed
Feb 12, 2026
joyeecheung
reviewed
Feb 12, 2026
| } | ||
|
|
||
| if (skipped > 0) { | ||
| ProcessEmitWarning( |
Member
There was a problem hiding this comment.
I wonder if we should make this an option to the API instead of unconditionally emitting a warning? So if the user uses tls.getCACertifcate, they can choose warn, ignore, throw (or even get a list of errors on the side) when there's an error in parsing these certificates. For NODE_USE_SYSTEM_CA/--use-system-ca, warn is a sensible behavior.
Co-authored-by: Anna Henningsen <github@addaleax.net>
Co-authored-by: Anna Henningsen <github@addaleax.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As suggested in the linked issue, this PR relaxes the X509 to PEM conversion by skipping failures for system certs. If conversion fails, Node.js will try to give info about the failed certs if it can. This new behavior is used only on system certs, since for others, the user has control. AFAIK, there is no way to add a reliable test for this, but if someone has an idea, feel free to share it with me.
Fixes: #61636