-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/x509: add ParseRevocationList, deprecate ParseCRL & ParseDERCRL #50674
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
Comments
This proposal has been added to the active column of the proposals project |
Does anyone object to the API in the top comment? |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Change https://go.dev/cl/390834 mentions this issue: |
CL 390834 added three additional fields beyond what was in this proposal:
Noting here in case anyone objects to them, although I doubt it given the vigor of the earlier discussion. |
Change https://go.dev/cl/414635 mentions this issue: |
Adds documentation for a handful of RevocationList fields. Updates #50674 Change-Id: I26b838553d870b631deaf8b9a5b4d0b251fdef20 Reviewed-on: https://go-review.googlesource.com/c/go/+/414635 Run-TryBot: Roland Shoemaker <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Russ Cox <[email protected]>
Adds documentation for a handful of RevocationList fields. Updates golang#50674 Change-Id: I26b838553d870b631deaf8b9a5b4d0b251fdef20 Reviewed-on: https://go-review.googlesource.com/c/go/+/414635 Run-TryBot: Roland Shoemaker <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Russ Cox <[email protected]>
The current implementation of CRLs in crypto/x509 and crypto/x509/pkix is somewhat confusing, easy to misuse, and does not match the design of the rest of the package. In particular it doesn't expose the necessary information to do safe issuer verification (see grpc/grpc-go#5130 for an example of how this can go wrong.)
We could try to provide the extra information required to do safe comparisons, but unfortunately due to the design of
pkix.CertificateList
, which is intended to be a direct ASN.1 analog, it is not possible to add new fields, since it will inherently change howencoding/asn1
encodes/decodes related data.In go1.15 we introduced
RevocationList
, a type used as input toCreateRevocationList
. I propose that we introduceParseRevocationList
, and convertRevocationList
into a Go representation of a CRL, similar to howCertificate
is used. This results in an API much more in line with the rest of the package, and would allow us more leeway to update the representative CRL structure without having to worry about its direct ASN.1 encoding.For the sake of slowly moving away from reliance on
encoding/asn1
, the newParseRevocationList
function should employ ax/crypto/cryptobyte
parser.This would deprecate the
pkix.CertificateList
type (and associated types), theParseCRL
andParseDERCRL
functions, and theCertificate.CheckCRLSignature
method (the latter being replaced with a method onRevocationList
.)cc @golang/security
The text was updated successfully, but these errors were encountered: