Merged
Conversation
Set the effective password on the engine before calling getPfxOfCurrentSigner() to ensure proper password handling. This fix addresses a critical bug where the password was not being properly configured when retrieving the PFX content. - Add setPassword() call before getPfxOfCurrentSigner() - Extract and pass UID to getPfxOfCurrentSigner for proper file handling - Strip 'account:' prefix from userUniqueIdentifier as expected by the handler Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Create a minimal test double (fake) of SignEngineHandler that: - Requires no infrastructure dependencies (filesystem, DI container, logging) - Tracks all method calls for assertion and verification - Enables testing PfxProvider business rules in isolation - Provides clean setup for certificate provisioning logic tests This test double is designed to be simple and maintainable, avoiding the complexity of mocking frameworks while still capturing essential behavior. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add comprehensive test suite for PfxProvider focusing on business rules rather than coverage: Business Rules Tested: - Reuse existing certificates without regeneration - Generate short-lived (1-day) certificates for click-to-sign - Handle password-based signing without certificate generation - Properly strip/preserve user ID prefixes - Return null for empty passwords in result - Use event-generated passwords, fallback to ISecureRandom - Properly set and cleanup leaf expiry overrides - Pass correct user data to certificate generation - Set password on engine before retrieving PFX content These tests validate core certificate provisioning logic without excessive mocks or focusing on code coverage metrics. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Member
Author
|
/backport to stable33 |
Member
Author
|
/backport to stable32 |
This was referenced Feb 8, 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.
No description provided.