replace the deprecated x509.ParseCRL with x509.ParseRevocationList

Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
Benjamin Wang 2023-11-03 10:24:49 +00:00 committed by Ivan Valdes
parent d298130eb0
commit 16d1ef949c
No known key found for this signature in database
GPG Key ID: 4037D37741ED0CC5

View File

@ -172,12 +172,12 @@ func checkCRL(crlPath string, cert []*x509.Certificate) error {
if err != nil {
return err
}
certList, err := x509.ParseCRL(crlBytes)
certList, err := x509.ParseRevocationList(crlBytes)
if err != nil {
return err
}
revokedSerials := make(map[string]struct{})
for _, rc := range certList.TBSCertList.RevokedCertificates {
for _, rc := range certList.RevokedCertificateEntries {
revokedSerials[string(rc.SerialNumber.Bytes())] = struct{}{}
}
for _, c := range cert {