Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opinionated handling of certificates with empty SubjectName fields #1

Open
str4d opened this issue Dec 16, 2019 · 2 comments
Open

Comments

@str4d
Copy link
Owner

str4d commented Dec 16, 2019

Suggested by @tarcieri. This would enable CommonName to be omitted from a certificate. However, before exposing this in x509::write::tbs_certificate (making either issuer or subject optional), we should ensure that we are still generating valid certificates. It appears that an empty Subject is valid under RFC 5280, but is not guaranteed to be compatible (and e.g. a non-empty CN is currently required under CA/B rules).

@tarcieri
Copy link

tarcieri commented Dec 16, 2019

I believe a certificate with an empty subject also needs a critical SAN to be valid.

The alternative to an empty subject which my understanding is more compatible is including something in the subject to make it non-empty. I believe dnQualifier has been (ab)used for this purpose (set to e.g. a random nonce).

@str4d
Copy link
Owner Author

str4d commented Jan 10, 2021

Recent updates:

So the remaining work is to either add SAN support (and then require either a subject or SAN), or translate an empty subject into a non-empty field.

@str4d str4d changed the title Pass CommonName to x509::write::name as Option<&str> Add opinionated handling of certificates with empty SubjectName fields Jan 10, 2021
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

No branches or pull requests

2 participants