-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: add API to create RFC-compliant CRLs #35428
Comments
CC @FiloSottile |
Currently it seems the only divergence from 5280 is the lack of the CRLNumber extension, which does unfortunately make the CRLs unusable for a conforming CA. A simple solution here would be to either introduce a |
Or, As a side note, it's a shame this got bumped down to backlog, considering that it's a public stdlib API function that always does the wrong thing. |
I propose the following new API. This is akin to the existing
There is obviously significant room here for bike shedding over function/type naming (and whether it should actually be a method on letsencrypt/boulder needs this functionality downstream so if this proposal looks acceptable to golang folks I'm happy to implement it and throw up a CL for the changes. |
@jefferai if you retitle this as "proposal: crypto/x509: add API to create CRL with [etc]" it will be addressed by the proposal review committee, and probably milestoned to 1.15 if accepted. |
The existing Certificate.CreateCRL method generates non-conformant CRLs and as such cannot be used for implementations that require standards compliance. This change implements a new top level method, CreateCRL, which generates compliant CRLs, and offers an extensible API if any extensions/fields need to be supported in the future. Fixes golang#35428 Change-Id: I06ef833cb860077b2d42c1bb262a72c3e918aa0d
The existing Certificate.CreateCRL method generates non-conformant CRLs and as such cannot be used for implementations that require standards compliance. This change implements a new top level method, CreateCRL, which generates compliant CRLs, and offers an extensible API if any extensions/fields need to be supported in the future. Fixes golang#35428 Change-Id: I06ef833cb860077b2d42c1bb262a72c3e918aa0d
The existing Certificate.CreateCRL method generates non-conformant CRLs and as such cannot be used for implementations that require standards compliance. This change implements a new top level method, CreateCRL, which generates compliant CRLs, and offers an extensible API if any extensions/fields need to be supported in the future. Fixes golang#35428 Change-Id: I06ef833cb860077b2d42c1bb262a72c3e918aa0d
Change https://golang.org/cl/217298 mentions this issue: |
I had been thinking of closing this and opening a new one as a proposal given the above comment, but with the submitted patch set I'm not sure if I should touch anything :-) |
Just edit the title as I suggested and include the API name from the CL. The CL refs this issue by number. No action can be taken on the CL until a proposal is reviewed and accepted here. |
I have a use case where I want to be able to specify Instead of
|
I like the symmetry with Here's a suggested API. Note the following changes:
Edit: removed |
Adding to proposal minutes for wider visibility. Seems OK. |
@FiloSottile these changes look good to me. One thing I'd suggest against is including |
Agreed, we can introduce it along with a parsing function if needed. |
The proposed struct looks good to me too! |
Based on the discussion above, this seems like a likely accept. |
Assuming there are no other major comments I'll look to update my existing CL sometime next week to reflect the proposal by @FiloSottile. |
No change in consensus, so accepted. |
What version of Go are you using (
go version
)?This is a bit of a redux of #13931, but while the fix there changed the serialization on the wire of the default value, it didn't address the underlying problem, which is that the X.509 RFC pretty clearly states (https://tools.ietf.org/html/rfc5280#section-5):
This means that (as specified a bit after that) although any conforming client should be able to parse and understand a CRL created with this function, technically every CRL created via this function is non-conforming, because even if the root is self-signed it's still a CA. There's an argument to be made that a third party could be signing and creating the CRLs, but the behavior there isn't a distinction that is made clear in the RFC and it seems reasonable to assume that the intention is for it to behave the same way.
This would probably require a new function to create v2 CRLs so that the parameters required for the extensions can be provided.
Obviously clients are free to then ignore this extra information, but that's up to the client; it seems pretty clear that anything acting as a CA is required to issue v2 CRLs.
The text was updated successfully, but these errors were encountered: