From a4b5ebb62ff81a520e0b5162416f4cc7f005a789 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 17 Jun 2021 01:30:29 +0700 Subject: [PATCH] remove contentOID check --- wolfcrypt/src/pkcs7.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index dcc876088..66094cc21 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -12672,7 +12672,7 @@ int wc_PKCS7_EncodeCompressedData(PKCS7* pkcs7, byte* output, word32 outputSz) compressedDataSeqSz = SetSequence(totalSz, compressedDataSeq); totalSz += compressedDataSeqSz; - if (pkcs7->version == 3 && pkcs7->contentOID == COMPRESSED_DATA) { + if (pkcs7->version == 3) { /* RFC 4108 section 2 * When the SignedData is version 3 and eContent is compressedData then * the encoding is : @@ -12687,10 +12687,7 @@ int wc_PKCS7_EncodeCompressedData(PKCS7* pkcs7, byte* output, word32 outputSz) contentInfoContentSeqSz = 0; } else { - /* pkcs7->contentOID should be ENCRYPTED_DATA, FIRMWARE_PKG_DATA is just - * an octet string for eContent. - * - * EncryptedData eContent type is encoded with: + /* EncryptedData eContent type is encoded with: * EncryptedData { * version * EncryptedContentInfo {