forked from wolfSSL/wolfssl
Further improvements to hashing code to make sure wc_*Free is always called including wc_HashFree. Added new defines to disable PIC32MZ hardware features using NO_PIC32MZ_HASH, NO_PIC32MZ_RNG and NO_PIC32MZ_CRYPT.
This commit is contained in:
@@ -5277,6 +5277,7 @@ static int test_wc_Sha3_224_Final (void)
|
||||
ret = WOLFSSL_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
wc_Sha3_224_Free(&sha3);
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
|
||||
if (ret == 0) {
|
||||
@@ -5370,7 +5371,9 @@ static int test_wc_Sha3_256_Final (void)
|
||||
ret = WOLFSSL_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
wc_Sha3_256_Free(&sha3);
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
|
||||
if (ret == 0) {
|
||||
printf(testingFmt, "wc_Sha3_256_GetHash()");
|
||||
|
||||
@@ -5461,7 +5464,9 @@ static int test_wc_Sha3_384_Final (void)
|
||||
ret = WOLFSSL_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
wc_Sha3_384_Free(&sha3);
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
|
||||
if (ret == 0) {
|
||||
printf(testingFmt, "wc_Sha3_384_GetHash()");
|
||||
|
||||
@@ -5554,7 +5559,9 @@ static int test_wc_Sha3_512_Final (void)
|
||||
ret = WOLFSSL_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
wc_Sha3_512_Free(&sha3);
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
|
||||
if (ret == 0) {
|
||||
printf(testingFmt, "wc_Sha3_512_GetHash()");
|
||||
|
||||
@@ -15390,6 +15397,8 @@ static int test_wc_HashInit(void)
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
wc_HashFree(&hash, enumArray[i]);
|
||||
|
||||
/* check for null ptr */
|
||||
if (wc_HashInit(NULL, enumArray[i]) != BAD_FUNC_ARG) {
|
||||
ret = 1;
|
||||
|
||||
Reference in New Issue
Block a user