diff --git a/src/crypto/x509/x509.go b/src/crypto/x509/x509.go index fb4ba0591b..df86c65939 100644 --- a/src/crypto/x509/x509.go +++ b/src/crypto/x509/x509.go @@ -2162,7 +2162,7 @@ type certificateList struct { } type tbsCertificateList struct { - Raw asn1.RawContent + Raw asn1.RawContent Version int `asn1:"optional,default:0"` Signature pkix.AlgorithmIdentifier Issuer asn1.RawValue @@ -2264,6 +2264,9 @@ func CreateRevocationList(rand io.Reader, template *RevocationList, issuer *Cert if err != nil { return nil, err } + + // Optimization to only marshal this struct once, when signing and + // then embedding in certificateList below. tbsCertList.Raw = tbsCertListContents input := tbsCertListContents