-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Fix ca crash (1.0.2) #5115
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
Fix ca crash (1.0.2) #5115
Conversation
Misconfiguration (e.g. an empty policy section in the config file) can lead to an empty Subject. Since certificates should have unique Subjects this should not be allowed.
An index.txt entry which has an empty Subject name field will cause ca to crash. Therefore check it when we load it to make sure its not empty. Fixes openssl#5109
|
Pushed. Thanks. |
Misconfiguration (e.g. an empty policy section in the config file) can lead to an empty Subject. Since certificates should have unique Subjects this should not be allowed. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #5115)
|
Empty subjects DNs (empty RDN sequences) are actually valid, and are normally printed as "/" on output, and were accepted via the I should also point out that some mainstream CAs (e.g. Let's Encrypt) include only a DNS name "CN" in the subject DN, but this is limited to ~64 bytes, and longer CNs are disallowed. In such cases one is forced to use an empty subject DN. Therefore, this PR is incorrect, and the change must be reverted. Instead the |
|
Closing this in favour of tracking it as part of the original issue, #5109. |
Two related issues were causing a seg fault in the ca application. Firstly it is possible to create a certificate with an empty Subject. Secondly if ca reads an index.txt file with a missing subject in an entry then it will crash.
This is the 1.0.2 version of #5114.
Fixes #5109