crypto/x509: switch test to ParseRevocationList

In following with Roland's TODO, switch TestDisableSHA1ForCertOnly to ParseRevocationList(...) over ParseCRL(...).

Change-Id: I8cdaf04ad0a1c8b94303415ae41933657067041e
GitHub-Last-Rev: bb2ef760e4
GitHub-Pull-Request: golang/go#56541
Reviewed-on: https://go-review.googlesource.com/c/go/+/447036
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
This commit is contained in:
Alexander Scheel 2022-11-03 13:09:31 +00:00 committed by Gopher Robot
parent 667c53e159
commit 7abc8a2e33
1 changed files with 2 additions and 3 deletions

View File

@ -3553,13 +3553,12 @@ func TestDisableSHA1ForCertOnly(t *testing.T) {
if err != nil {
t.Fatalf("failed to generate test CRL: %s", err)
}
// TODO(rolandshoemaker): this should be ParseRevocationList once it lands
crl, err := ParseCRL(crlDER)
crl, err := ParseRevocationList(crlDER)
if err != nil {
t.Fatalf("failed to parse test CRL: %s", err)
}
if err = cert.CheckCRLSignature(crl); err != nil {
if err = crl.CheckSignatureFrom(cert); err != nil {
t.Errorf("unexpected error: %s", err)
}