test: expand tls-check-server-identity coverage#60002
test: expand tls-check-server-identity coverage#60002diangogav wants to merge 1 commit intonodejs:mainfrom
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; |
RafaelGSS
left a comment
There was a problem hiding this comment.
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.
RafaelGSS
left a comment
There was a problem hiding this comment.
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>
PR-URL: #60002 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>