Skip to content

fix(validate): return false from name validator on charset errors#240

Open
sumleo wants to merge 1 commit intorusticata:masterfrom
sumleo:fix/name-validator-return
Open

fix(validate): return false from name validator on charset errors#240
sumleo wants to merge 1 commit intorusticata:masterfrom
sumleo:fix/name-validator-return

Conversation

@sumleo
Copy link

@sumleo sumleo commented Feb 15, 2026

Summary

  • X509NameStructureValidator::validate() always returned true regardless of validation results
  • The res variable was declared as immutable true and never updated, even when invalid charset errors were detected and logged
  • Fixed by making res mutable and setting it to false when non-ASCII characters are found in PrintableString or IA5String attribute values

Test plan

  • Full test suite passes with cargo test --all-features

X509NameStructureValidator::validate() declared res as immutable true
and never updated it, so it always returned true even when invalid
charset errors were detected. Make res mutable and set it to false
when a non-ASCII character is found in a PrintableString or IA5String
attribute value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant