mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
Merge pull request #5707 from JacobBarthelmeh/Testing
free PKCS7 in test case
This commit is contained in:
@ -29020,9 +29020,12 @@ static int test_wc_PKCS7_VerifySignedData(void)
|
|||||||
AssertIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
|
AssertIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
|
||||||
AssertIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
|
AssertIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
|
||||||
AssertIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
|
AssertIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
|
||||||
wc_PKCS7_Free(pkcs7);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
|
#ifndef NO_RSA
|
||||||
|
wc_PKCS7_Free(pkcs7);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Success test with ECC certs/key */
|
/* Success test with ECC certs/key */
|
||||||
outputSz = sizeof(output);
|
outputSz = sizeof(output);
|
||||||
XMEMSET(output, 0, outputSz);
|
XMEMSET(output, 0, outputSz);
|
||||||
@ -29034,7 +29037,6 @@ static int test_wc_PKCS7_VerifySignedData(void)
|
|||||||
AssertIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
|
AssertIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
|
||||||
AssertIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
|
AssertIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
|
||||||
AssertIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
|
AssertIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
|
||||||
wc_PKCS7_Free(pkcs7);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Test bad args. */
|
/* Test bad args. */
|
||||||
|
Reference in New Issue
Block a user