Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@ func EncryptUsingPSK(content []byte, key []byte) ([]byte, error) {
}

func marshalEncryptedContent(content []byte) asn1.RawValue {
asn1Content, _ := asn1.Marshal(content)
return asn1.RawValue{Tag: 0, Class: 2, Bytes: asn1Content, IsCompound: true}
return asn1.RawValue{Bytes: content, Class: 2, IsCompound: false}
}

func encryptKey(key []byte, recipient *x509.Certificate, algorithm asn1.ObjectIdentifier, hash crypto.Hash) ([]byte, error) {
Expand Down