]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: create CRLs with Issuer.RawSubject
authorAlexander Scheel <alex.scheel@hashicorp.com>
Wed, 2 Nov 2022 16:19:23 +0000 (16:19 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 3 Nov 2022 15:18:40 +0000 (15:18 +0000)
commita367981b4c8e3ae955eca9cc597d9622201155f3
treec9d33587f09a47d1f87acc7460320c0a62084418
parent1bfb51f8f79acc13ff1c79576bf0a340d4d6706e
crypto/x509: create CRLs with Issuer.RawSubject

Per discussion with Roland Shoemaker, this updates
x509.CreateRevocationList to mirror the behavior of
x509.CreateCertificate, creating an internal struct for the ASN.1
encoding of the CRL. This allows us to switch the Issuer field type to
asn1.RawValue, bypassing the round-tripping issues of pkix.Name in most
scenarios.

Per linked ticket, this resolves issues where a non-Go created
certificate can be used to create CRLs which aren't correctly attested
to that certificate. In rare cases where the CRL issuer is validated
against the certificate's issuer (such as the linked JDK example), this
can result in failing to check this CRL for the candidate certificate.

Fixes #53754

Change-Id: If0adc053c081d6fb0b1ce47324c877eb2429a51f
GitHub-Last-Rev: 033115dd5eb93295330eb151ff8557df5bffbec8
GitHub-Pull-Request: golang/go#53985
Reviewed-on: https://go-review.googlesource.com/c/go/+/418834
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
src/crypto/x509/x509.go
src/crypto/x509/x509_test.go