Fix for K64 MMCAU with WOLFSSL_SMALL_STACK_CACHE. Moved random test prior to cipher tests (was getting called first time in GMAC test).

This commit is contained in:
David Garske
2020-01-06 14:09:41 -08:00
parent 7d2adb2fc0
commit acfe9717f8
2 changed files with 11 additions and 7 deletions

View File

@ -410,6 +410,7 @@ static int InitSha256(wc_Sha256* sha256)
if (ret != 0) { if (ret != 0) {
return ret; return ret;
} }
#ifdef FREESCALE_MMCAU_CLASSIC_SHA #ifdef FREESCALE_MMCAU_CLASSIC_SHA
cau_sha256_initialize_output(sha256->digest); cau_sha256_initialize_output(sha256->digest);
#else #else
@ -420,6 +421,9 @@ static int InitSha256(wc_Sha256* sha256)
sha256->buffLen = 0; sha256->buffLen = 0;
sha256->loLen = 0; sha256->loLen = 0;
sha256->hiLen = 0; sha256->hiLen = 0;
#ifdef WOLFSSL_SMALL_STACK_CACHE
sha256->W = NULL;
#endif
return ret; return ret;
} }

View File

@ -620,6 +620,13 @@ initDefaultName();
test_pass("asn test passed!\n"); test_pass("asn test passed!\n");
#endif #endif
#ifndef WC_NO_RNG
if ( (ret = random_test()) != 0)
return err_sys("RANDOM test failed!\n", ret);
else
test_pass("RANDOM test passed!\n");
#endif /* WC_NO_RNG */
#ifndef NO_MD5 #ifndef NO_MD5
if ( (ret = md5_test()) != 0) if ( (ret = md5_test()) != 0)
return err_sys("MD5 test failed!\n", ret); return err_sys("MD5 test failed!\n", ret);
@ -901,13 +908,6 @@ initDefaultName();
test_pass("IDEA test passed!\n"); test_pass("IDEA test passed!\n");
#endif #endif
#ifndef WC_NO_RNG
if ( (ret = random_test()) != 0)
return err_sys("RANDOM test failed!\n", ret);
else
test_pass("RANDOM test passed!\n");
#endif /* WC_NO_RNG */
#ifndef NO_RSA #ifndef NO_RSA
#ifdef WC_RSA_NO_PADDING #ifdef WC_RSA_NO_PADDING
if ( (ret = rsa_no_pad_test()) != 0) if ( (ret = rsa_no_pad_test()) != 0)