Skip to content

[stable32] fix: validate empty commonName in certificate generation#6017

Merged
vitormattos merged 1 commit intostable32from
backport/6015/stable32
Dec 6, 2025
Merged

[stable32] fix: validate empty commonName in certificate generation#6017
vitormattos merged 1 commit intostable32from
backport/6015/stable32

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 <1079143+vitormattos@users.noreply.github.com>
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (32) milestone Dec 6, 2025
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 6, 2025
@vitormattos vitormattos merged commit 41a0fb7 into stable32 Dec 6, 2025
43 of 53 checks passed
@vitormattos vitormattos deleted the backport/6015/stable32 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