Skip to content

main,gencerts: Punycode non-ASCII hostnames#3427

Merged
davecgh merged 1 commit intodecred:masterfrom
jrick:idna
Aug 21, 2024
Merged

main,gencerts: Punycode non-ASCII hostnames#3427
davecgh merged 1 commit intodecred:masterfrom
jrick:idna

Conversation

@jrick
Copy link
Member

@jrick jrick commented Aug 21, 2024

When a certificate is autogenerated by dcrd or with gencerts, errors would occur if any hostname contained non-ASCII characters. While X509 certificates do support UTF8 strings, Go does not yet support creating these.

Instead, as a workaround and to keep certificate generation working to avoid errors at dcrd startup, convert hostnames with non-ASCII Unicode characters to their IDNA form, which uses Punycode to ASCII-encode the problematic Unicode characters.

@davecgh davecgh added this to the 2.1.0 milestone Aug 21, 2024
When a certificate is autogenerated by dcrd or with gencerts, errors would
occur if any hostname contained non-ASCII characters.  While X509 certificates
do support UTF8 strings, Go does not yet support creating these.

Instead, as a workaround and to keep certificate generation working to avoid
errors at dcrd startup, convert hostnames with non-ASCII Unicode characters to
their IDNA form, which uses Punycode to ASCII-encode the problematic Unicode
characters.
@davecgh davecgh merged commit bd6e4f4 into decred:master Aug 21, 2024
@jrick jrick deleted the idna branch August 21, 2024 01:29
@davecgh davecgh modified the milestones: 2.1.0, 2.0.4 Aug 28, 2024
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