-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
test: expand tls-check-server-identity coverage #60002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: expand tls-check-server-identity coverage #60002
Conversation
diangogav
commented
Sep 24, 2025
- Falsy pattern via SAN: DNS: (triggers if (!pattern) return false)
- CN array with empty string: CN: ['']
- Empty label in pattern: bad..example.com (CN and SAN)
- Non-ASCII/blank label: caf\u00E9.example.com and bad label.com
- Multiple wildcards in first label: b**.a.com (CN and SAN)
- Prefix mismatch with single wildcard: ab*cd.a.com vs xbcd.a.com (CN and SAN)
Waiting for approval; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you expand on why these additional checks are important? Any coverage info?
Hellooo @RafaelGSS ! I saw that some validations in the check function were not covered when looking at the coverage, and that is what this PR covers. https://app.codecov.io/gh/nodejs/node/blob/main/lib%2Ftls.js |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, the link you originally sent is enough. LGTM with green ci!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60002 +/- ##
=======================================
Coverage 88.45% 88.45%
=======================================
Files 703 703
Lines 207545 207529 -16
Branches 40013 40010 -3
=======================================
- Hits 183578 183572 -6
+ Misses 15957 15940 -17
- Partials 8010 8017 +7 🚀 New features to boost your workflow:
|
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
PR-URL: #60002 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Landed in 93ee08c |
PR-URL: #60002 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>