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: ParseRevocationList misses entry extensions #53592
Comments
Change https://go.dev/cl/414877 mentions this issue: |
@agl @FiloSottile can one or both of you give the CL a look? This code is not my department, though the bug looks completely plausible. |
@rolandshoemaker I believe this also qualifies as a release blocker? I've added a go playground demonstration to the original report. |
Bah, good catch. We can just treat this as a bug fix for new functionality. |
When checking to see if a CRL entry has any extensions, attempt to read them from the individual revokedCertificate, rather than from the parent TBSCertList. Additionally, crlEntryExtensions is not an EXPLICIT field (c.f. crlExtension and Certificate extensions), so do not perform an extra layer of unwrapping when parsing the field. The added test case fails without the accompanying changes. Fixes golang#53592 Change-Id: Icc00e4c911f196aef77e3248117de64ddc5ea27f Reviewed-on: https://go-review.googlesource.com/c/go/+/414877 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> Run-TryBot: Roland Shoemaker <roland@golang.org> Auto-Submit: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
What version of Go are you using (
go version
)?go1.19beta1
What did you do?
x509.RevocationList
with an entry which has extensions (such as a reasonCode)x509.CreateRevocationList
to sign and serialize the CRL to DERx509.ParseRevocationList
to parse the CRLFull demonstration: https://go.dev/play/p/ejqFzRaValY?v=gotip
What did you expect to see?
The exact same in-memory structures should be recreated. In particular, the individual entries should still have all of their extensions.
What did you see instead?
Individual entries are missing their extensions.
The text was updated successfully, but these errors were encountered: