Skip to content

Commit be233fc

Browse files
Merge pull request #7346 from SparkiDev/regression_fixes_11
Regression test fixes
2 parents abd7449 + 638d0b1 commit be233fc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

wolfcrypt/src/pkcs7.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6183,6 +6183,9 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
61836183
contentDynamic = (byte*)XMALLOC(contentSz,
61846184
pkcs7->heap, DYNAMIC_TYPE_PKCS7);
61856185
if (contentDynamic == NULL) {
6186+
#ifndef NO_PKCS7_STREAM
6187+
pkcs7->stream = stream;
6188+
#endif
61866189
ret = MEMORY_E;
61876190
break;
61886191
}

wolfcrypt/test/test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44891,7 +44891,7 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
4489144891

4489244892
/* encode Signed Encrypted Compressed FirmwarePkgData */
4489344893
encodedSz = wc_PKCS7_EncodeSignedEncryptedCompressedFPD(pkcs7,
44894-
testVectors[i].encryptKey, testVectors[i].encryptKeySz,
44894+
(byte*)testVectors[i].encryptKey, testVectors[i].encryptKeySz,
4489544895
testVectors[i].privateKey, testVectors[i].privateKeySz,
4489644896
testVectors[i].encryptOID, testVectors[i].signOID,
4489744897
testVectors[i].hashOID, (byte*)testVectors[i].content,
@@ -45000,7 +45000,7 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
4500045000
XMEMSET(encryptedTmp, 0, encryptedTmpSz);
4500145001

4500245002
/* decrypt inner encryptedData */
45003-
pkcs7->encryptionKey = testVectors[i].encryptKey;
45003+
pkcs7->encryptionKey = (byte*)testVectors[i].encryptKey;
4500445004
pkcs7->encryptionKeySz = testVectors[i].encryptKeySz;
4500545005

4500645006
encryptedTmpSz = wc_PKCS7_DecodeEncryptedData(pkcs7, pkcs7->content,

0 commit comments

Comments
 (0)