Skip to content

fix: allow signing for legacy certificates missing CRL metadata (fixes #7597)#7605

Merged
vitormattos merged 11 commits intomainfrom
fix/7597-missing-revocation-legacy-cert
Apr 25, 2026
Merged

fix: allow signing for legacy certificates missing CRL metadata (fixes #7597)#7605
vitormattos merged 11 commits intomainfrom
fix/7597-missing-revocation-legacy-cert

Conversation

@vitormattos
Copy link
Copy Markdown
Member

Summary

This PR fixes a regression reported in #7597 where signing fails with:

This certificate has no revocation information. Signing is not allowed. Contact your administrator.

for legacy certificates after upgrade.

Root Cause

Password::validateCertificateRevocation() treated CrlValidationStatus::MISSING as a hard failure and blocked signing.
For legacy certificates issued before CRL metadata/URLs were present, this made signing impossible after upgrade.

What changed

  • Add regression coverage in tests/php/Unit/Service/IdentifyMethod/PasswordTest.php for crl_validation = MISSING expecting successful signing.
  • Update lib/Service/IdentifyMethod/SignatureMethod/Password.php to allow signing when status is MISSING, with warning log for observability.

Reproduction evidence (before fix)

Filtered unit test run failed with the exact issue message:

PasswordTest::testValidateToSignWithCertificateData data set "invalid certificate - crl missing"

LibresignException: This certificate has no revocation information. Signing is not allowed. Contact your administrator.

Validation (after fix)

  • composer test:unit -- --filter PasswordTest::testValidateToSignWithCertificateData
  • composer test:unit -- --filter PasswordTest

Notes

This preserves revocation blocking for other unsafe statuses (REVOKED, URLS_INACCESSIBLE, VALIDATION_ERROR, VALIDATION_FAILED, NO_URLS) and only relaxes legacy compatibility for MISSING.

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 Roadmap Apr 25, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable33

@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos merged commit 882ccab into main Apr 25, 2026
77 checks passed
@vitormattos vitormattos deleted the fix/7597-missing-revocation-legacy-cert branch April 25, 2026 17:22
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

1 participant