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

crypto/x509: ensure CreateCertificate won't generate unparsable certificates #24156

Open
FiloSottile opened this issue Feb 27, 2018 · 5 comments
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@FiloSottile
Copy link
Contributor

CreateCertificate should return an error instead of generating a certificate that will fail ParseCertificate. We should check that's the case and maybe test or enforce this.

See #23995.

@titanous titanous added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 27, 2018
@titanous titanous added this to the Go1.11 milestone Feb 27, 2018
@jlhawn
Copy link

jlhawn commented Mar 1, 2018

Do you think it would have been a better idea to first have a minor release of Go which adds the new validation process to CreateCertificate and then, in a later minor release, start enforcing that validation during ParseCertificate? That way, at least, many people wouldn't be in the situation like I am in now where a go1.10-bulit program can't load the certificates generated by the previous version of that same program.

@odeke-em
Copy link
Member

@jlhawn oh, sorry to hear that and that we haven't addressed your comment, yet Go1.11 is coming up fast. Would you mind producing a repro here that demonstrates the incompatibility between Go1.10 can't load certificates from previous versions? If so, that's a breaking change, which I'd suspect would perhaps violate the compatibility promise.

@rsc
Copy link
Contributor

rsc commented Aug 17, 2018

Moving to Go 1.12.

@rsc rsc modified the milestones: Go1.11, Go1.12 Aug 17, 2018
@jlhawn
Copy link

jlhawn commented Sep 4, 2018

@FiloSottile Sorry for the (very) late reply. It looks like my concerns are already addressed in the latest go 1.10 release with this patch which ignores invalid email address subject names in certificates.

@andybons andybons modified the milestones: Go1.12, Go1.13 Feb 12, 2019
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@FiloSottile FiloSottile added help wanted Testing An issue that has been verified to require only test changes, not just a test failure. labels Sep 30, 2019
@FiloSottile FiloSottile modified the milestones: Go1.14, Unplanned Sep 30, 2019
@FiloSottile
Copy link
Contributor Author

To be clear, it would be nice to fuzz CreateCertificate with various template values, and check that if CreateCertificate succeeds, ParseCertificate does as well, ideally with matching fields.

This is up for anyone who wants to take it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

6 participants