Skip to content

Conversation

@bavshin-f5
Copy link
Member

Baseline Requirements discouraged the use of Subject commonName in Subscriber Certificates since v1.0 (2011). Certbot has been omitting the attribute from CSRs since v0.14.0 (2017).

There are valid reasons for this, including redundancy (subjectAltName is required, and Subject commonName MUST match one of the subjectAltName entries) and a 64 byte length limit. However, some very old HTTP clients and some not-so-old clients for other protocols (email) take exception to certificates without commonName.

Let's Encrypt now decided to aggressively encourage ACME clients to stop setting commonName as a part of their IP identifier support rollout with the following error:

urn:ietf:params:acme:error:badCSR: Error finalizing order :: CSR contains IP address in Common Name

We already attempt to pick a DNS name for CN, but that is not possible if the list of identifiers has only IP addresses. Let's just stop doing that and always send an empty Subject.

Fixes #105


Draft, because I'm still considering if we need to add an option for this. Most of my test servers don't perform CN promotion and issue certificates with an empty Subject.
Also, still testing.

Baseline Requirements discouraged the use of Subject commonName in
Subscriber Certificates since v1.0 (2011).  Certbot has been omitting
the attribute from CSRs since v0.14.0 (2017).

There are valid reasons for this, including redundancy (subjectAltName
is required, and Subject commonName MUST match one of the subjectAltName
entries) and a 64 byte length limit.  However, some _very_ old HTTP
clients and some not-so-old clients for other protocols (email) take
exception to certificates without commonName.

Let's Encrypt now decided to aggressively encourage ACME clients to stop
setting commonName as a part of their IP identifier support rollout with
the following error:

   urn:ietf:params:acme:error:badCSR: Error finalizing order :: CSR contains IP address in Common Name

We already attempt to pick a DNS name for CN, but that is not possible
if the list of identifiers has only IP addresses.  Let's just stop doing
that and always send an empty Subject.
@HanadaLee
Copy link

I suggest providing an option, but setting it to off by default, to avoid the awkward situation of it not working in special use cases.

However, some very old HTTP clients and some not-so-old clients for other protocols (email) take exception to certificates without commonName.

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.

ACME badCSR: nginx-acme selects IP address as CSR Common Name during certificate renewal

2 participants