From 6e742e69efa9c7d046dfbe4e51e761939ac89438 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Wed, 20 Nov 2024 09:55:30 +0800 Subject: [PATCH] pkcs7: change EncryptedContent to implicit #270 --- pkcs7/envelope.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkcs7/envelope.go b/pkcs7/envelope.go index 33dcf64..45ab908 100644 --- a/pkcs7/envelope.go +++ b/pkcs7/envelope.go @@ -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) {