x509: rollback some change first #223

This commit is contained in:
Sun Yimin 2024-05-23 17:49:43 +08:00 committed by GitHub
parent 7c46d7b977
commit 6762238407
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2036,6 +2036,12 @@ func CreateRevocationList(rand io.Reader, template *x509.RevocationList, issuer
} }
var revokedCerts []pkix.RevokedCertificate var revokedCerts []pkix.RevokedCertificate
revokedCerts = make([]pkix.RevokedCertificate, len(template.RevokedCertificates))
for i, rc := range template.RevokedCertificates {
rc.RevocationTime = rc.RevocationTime.UTC()
revokedCerts[i] = rc
}
/*
// Only process the deprecated RevokedCertificates field if it is populated // Only process the deprecated RevokedCertificates field if it is populated
// and the new RevokedCertificateEntries field is not populated. // and the new RevokedCertificateEntries field is not populated.
if len(template.RevokedCertificates) > 0 && len(template.RevokedCertificateEntries) == 0 { if len(template.RevokedCertificates) > 0 && len(template.RevokedCertificateEntries) == 0 {
@ -2092,7 +2098,7 @@ func CreateRevocationList(rand io.Reader, template *x509.RevocationList, issuer
revokedCerts[i] = rc revokedCerts[i] = rc
} }
} }
*/
aki, err := asn1.Marshal(authKeyId{Id: issuer.SubjectKeyId}) aki, err := asn1.Marshal(authKeyId{Id: issuer.SubjectKeyId})
if err != nil { if err != nil {