Skip to content

[stable31] fix: validate empty commonName in certificate generation#6016

Merged
vitormattos merged 1 commit intostable31from
backport/6015/stable31
Dec 6, 2025
Merged

[stable31] fix: validate empty commonName in certificate generation#6016
vitormattos merged 1 commit intostable31from
backport/6015/stable31

Conversation

@backportbot-libresign
Copy link
Copy Markdown

Backport of PR #6015

- Add validation to prevent empty Common Name (CN) in OpenSslHandler and CfsslHandler
- Throw EmptyCertificateException with clear message when CN is empty
- Fix JSignPdfHandlerTest to use valid commonName 'Test Root CA'
- Add unit test to verify empty CN validation works correctly

The owner field in libresign_crl table is mandatory without default value.
Previously, generateRootCert('') would fail at database level with unclear
error. Now it fails early with proper validation message.

Signed-off-by: Vitor Mattos <[email protected]>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 6, 2025
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (31) milestone Dec 6, 2025
@vitormattos vitormattos merged commit 7228fc6 into stable31 Dec 6, 2025
45 of 57 checks passed
@vitormattos vitormattos deleted the backport/6015/stable31 branch December 6, 2025 20:58
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant