File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15007,14 +15007,20 @@ static int test_Sha512_Family_Final(int type, int isRaw)
1500715007 hash_test[2] = hash3;
1500815008 times = sizeof(hash_test) / sizeof(byte *);
1500915009
15010- /* Good test args. */
15011- for (i = 0; i < times; i++) {
15012- ExpectIntEQ(finalFp(&sha512, hash_test[i]), 0);
15010+ #if defined(HAVE_FIPS) || defined(HAVE_SELFTEST) || \
15011+ defined(WOLFSSL_NO_HASH_RAW)
15012+ if (finalFp != NULL)
15013+ #endif
15014+ {
15015+ /* Good test args. */
15016+ for (i = 0; i < times; i++) {
15017+ ExpectIntEQ(finalFp(&sha512, hash_test[i]), 0);
15018+ }
15019+ /* Test bad args. */
15020+ ExpectIntEQ(finalFp(NULL, NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
15021+ ExpectIntEQ(finalFp(NULL, hash1), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
15022+ ExpectIntEQ(finalFp(&sha512, NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
1501315023 }
15014- /* Test bad args. */
15015- ExpectIntEQ(finalFp(NULL, NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
15016- ExpectIntEQ(finalFp(NULL, hash1), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
15017- ExpectIntEQ(finalFp(&sha512, NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
1501815024
1501915025 freeFp(&sha512);
1502015026
You can’t perform that action at this time.
0 commit comments