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 · 4 comments

Comments

Projects
None yet
5 participants
@FiloSottile
Member

FiloSottile commented Feb 27, 2018

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 label Feb 27, 2018

@titanous titanous added this to the Go1.11 milestone Feb 27, 2018

@jlhawn

This comment has been minimized.

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

This comment has been minimized.

Member

odeke-em commented Jul 20, 2018

@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

This comment has been minimized.

Contributor

rsc commented Aug 17, 2018

Moving to Go 1.12.

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

@jlhawn

This comment has been minimized.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment