pkcs7: change EncryptedContent to implicit #270

This commit is contained in:
Sun Yimin 2024-11-20 09:55:30 +08:00 committed by GitHub
parent 0e616425aa
commit 6e742e69ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,8 +272,7 @@ func newEncryptedContent(contentType asn1.ObjectIdentifier, alg *pkix.AlgorithmI
}
func marshalEncryptedContent(content []byte) asn1.RawValue {
asn1Content, _ := asn1.Marshal(content)
return asn1.RawValue{Tag: 0, Class: asn1.ClassContextSpecific, Bytes: asn1Content, IsCompound: true}
return asn1.RawValue{Tag: 0, Class: asn1.ClassContextSpecific, Bytes: content}
}
func encryptKey(key []byte, recipient *smx509.Certificate, isCFCA bool) ([]byte, error) {