Skip to content

[stable31] test: add integration tests for certificate engine switching - #6055

Merged
vitormattos merged 2 commits into
stable31from
backport/6053/stable31
Dec 9, 2025
Merged

vitormattos merged 2 commits into
stable31from
backport/6053/stable31

Conversation

@backportbot-libresign

Copy link
Copy Markdown

Backport of PR #6053

Add Behat integration tests to validate engine switch detection.
Tests verify that switching between OpenSSL and CFSSL certificate
engines without proper configuration is correctly detected and
reported.

Scenarios tested:
- Set OpenSSL engine, configure it, then switch to unconfigured CFSSL
- Delete engine configuration and verify error state

Fixes #5272

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
When switching from OpenSSL to CFSSL engine without configuring CFSSL,
the configure-check was incorrectly showing 'success' status instead of
'error'. This happened because isSetupOk() only checked for ca.pem and
ca-key.pem files, which are common to both engines and shared in the
same config_path directory.

Now isSetupOk() also verifies the presence of CFSSL-specific files
(csr_server.json and config_server.json) to ensure it's a valid CFSSL
configuration and not just leftover OpenSSL files.

This fix ensures the certificate_engine_switch integration test passes.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in LibreSign Roadmap Dec 9, 2025
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (31) milestone Dec 9, 2025
@vitormattos
vitormattos merged commit 59f76ee into stable31 Dec 9, 2025
62 checks passed
@vitormattos
vitormattos deleted the backport/6053/stable31 branch December 9, 2025 16:24
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in LibreSign Roadmap Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant