Repository navigation
test(ca): cover legacy CA identifier parsing and PKI paths - #9518
Merged
vitormattos merged 1 commit intoNov 15, 2026
Merged
Conversation
Add data-provider based regression tests for getCaIdParsed(), generatePkiDirectoryName() and generatePkiDirectoryNameFromParams() for both OpenSSL (_e:o) and CFSSL (_e:c) legacy IDs, malformed ID rejection and the exact shape of generated CA IDs. Refs: LibreSign#9472 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Matheus Andrade <2002matheus@gmail.com>
|
Thanks for opening your first pull request in this repository! ✌️ |
vitormattos
approved these changes
Nov 15, 2026
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.
Requested by Matheus · project thread
Resolves: #9472
📝 Summary
Adds regression tests to the existing
CaIdentifierServiceTestthat pin the legacy OpenSSL (_e:o) and CFSSL (_e:c) CA identifier contract before the multi-CA registry work. No production code changes.getCaIdParsed(): asserts all parsed fields (engineName,instanceId,generation,engineType) for both engines, plus 14 malformed IDs that must throwInvalidArgumentException(exception messages are not asserted).generatePkiDirectoryName()/generatePkiDirectoryNameFromParams(): exact paths for both engines and several generations; invalid IDs are rejected.generateCaId(): exact ID shape and the values stored ininstance_id/ca_id, plus unsupported engine rejection.🧪 How to test
Validation evidence
CaIdentifierServiceTestOK (39 tests, 45 assertions). Temporary mutations of thepki/prefix, directory separator, CFSSL engine letter and the generation regex each made the tests fail.composer cs:check(0 of 959 files to fix), Psalm (no errors),php -l.⚙️ API / Back-end changes
composer openapiwhen necessary (not necessary)✅ Checklist
🤖 AI (if applicable)