Per https://github.com/letsencrypt/boulder/issues/1488, we’ve fixed Boulder so that it won’t issue a certificate with a CN greater than 64 characters in length. However, this creates a problem for hostnames longer than 64 characters (fortunately they are relatively rare).
In order to issue for a hostname longer than 64 characters, we’d have to include the hostname as a dNSName in the subjectAltNames extension, and omit the hostname from the Subject. This is fine, since CN in Subject has been deprecated for a long time. However, Subject does have to be non-empty.
Here’s our approach in the short term: We’re going to be adding serialNumber to the Subject field of all certificates. For now, we will continue to include CN in the Subject, but only if the CN field was present in the CSR.
When we receive a CSR that includes a CN, we will continue to use that CN both in Subject and in subjectAltNames. If we receive a CSR with no CN (that is, all the names in the CSR are in subjectAltNames), we will issue certificate with a Subject containing only a serialNumber field. Using the official Python client, you would get:
Subject: CN=www.example.com/serialNumber=fa85bc05fcfd90b51cd2ebd1025153318362
However, if you constructed your own CSR with subjectAltNames but no CN (for instance, because your hostname is longer than 64 characters), you could get:
Subject: serialNumber=fa85bc05fcfd90b51cd2ebd1025153318362
This change is currently active in staging. You can get a certificate without CN with a command like this (substitute example.com for your own domain name):
openssl req -new -nodes -keyout key.pem -sha256 -subj "/" -outform der -out csr.der -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(echo -e "[SAN]\nsubjectAltName=DNS:example.com"))
./letsencrypt-auto --test-csr --csr csr.der
I’d appreciate any help testing out various clients. Please let us know if you’re aware of any client that will fail when presented with a certificate that either (a) has a serialNumber in the Subject, or (b) has no CN in the Subject.
Thanks,
Jacob