Skip to content

Remove CommonName support in leaf certs (fix #356)#373

Open
mholt wants to merge 4 commits intomasterfrom
no-cn
Open

Remove CommonName support in leaf certs (fix #356)#373
mholt wants to merge 4 commits intomasterfrom
no-cn

Conversation

@mholt
Copy link
Member

@mholt mholt commented Mar 5, 2026

It's been deprecated for almost 30 years, and is causing problems in some cases.

It's been deprecated for almost 30 years, and is causing problems in some cases.
@mholt
Copy link
Member Author

mholt commented Mar 5, 2026

Oh, lol, some of our test certs (for tests related to OCSP) only have CN. Will fix...

mholt added 2 commits March 4, 2026 17:32
Some test certs had CN only, heh
// for convenience, we do want to assemble all the subjects on the certificate
// into one list (except for CommonName, which has been deprecated for ~30 years,
// and becomes problematic in several instances, e.g. #356)
for _, name := range leaf.DNSNames {
Copy link

Choose a reason for hiding this comment

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

Are the values in these properties sorted already? If not I'd suggest sorting them, to get a consistent key down the line even if the issuer reshuffles the order of the values.

Copy link
Member Author

Choose a reason for hiding this comment

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

They are a slice, so they come in ordered, I assume in the order decoded from the ASN.1.

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