Skip to content

Commit

Permalink
pkcs7: change EncryptedContent to implicit #270
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun authored Nov 20, 2024
1 parent 0e61642 commit 6e742e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkcs7/envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6e742e6

Please sign in to comment.