Skip to content

Conversation

@starius
Copy link
Contributor

@starius starius commented Nov 26, 2025

Go 1.25 tightened x509 validation and now rejects empty dNSName entries, causing the default self-signed cert generation to fail when ServerName is left unset (x509: SAN dNSName is malformed). Filter out empty host names before calling cert.GenCertPair and reuse the same SAN list when renewing, allowing the default config to keep working. Add a unit test that reproduces the failure.

Go 1.25 tightened x509 validation and now rejects empty dNSName entries, causing
the default self-signed cert generation to fail when ServerName is left unset
(`x509: SAN dNSName is malformed`). Filter out empty host names before calling
cert.GenCertPair and reuse the same SAN list when renewing, allowing the default
config to keep working. Add a unit test that reproduces the failure.
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🦍

@Roasbeef Roasbeef merged commit 92e54ec into lightninglabs:master Nov 26, 2025
9 of 10 checks passed
@starius starius deleted the fix-empty-domain branch November 26, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants