go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
7.46k stars 986 forks source link

feat: support simplified issuance for very long domain names at Let's Encrypt #2054

Closed MartinWeindel closed 5 months ago

MartinWeindel commented 7 months ago

Let's encrypt will support certificates without common name starting at 2023-11-29. Details see in this announcement. It allows to create certificates for domains longer than 64 characters without needing to set the common name to a shorter domain name.

This PR makes small adjustments to the certificate ordering to reflect the new possibility. The common name is only set if the first domain name is shorter or equal than 64 characters. Therefore the change should be compatible with the current usage.

Note: The new behaviour can already be tested on the staging server (https://acme-staging-v02.api.letsencrypt.org/directory)

Fixes #2049

ldez commented 7 months ago

Hello,

this PR does nothing because the variable name "commonName" is not the effective common name in this part of the code, it's just a variable used to create the local name of a file, not a field sent to the ACME server.

I will handle the topic.

Related to #2049

ldez commented 7 months ago

I was confused by this change https://github.com/go-acme/lego/pull/2054/files#diff-49d368acbbb16528a9b447c4cbb44c3901b0636333a15e42117bc5184a28ec5cR284

But this PR is incomplete, I will add the missing pieces.

MartinWeindel commented 7 months ago

But this PR is incomplete, I will add the missing pieces.

@ldez Can I help with the "missing pieces"? What exactly is missing?