add DYNAMIC_TYPE_AES and DYNAMIC_TYPE_CMAC to enum in types.h, and use these where appropriate;

in test.c: use use HEAP_HINT, not NULL in XMALLOC/XFREE calls;

fix a couple typos in aes_test() re WOLFSSL_ASYNC_CRYPT;

add various missing WOLFSSL_SMALL_STACK_STATIC qualifiers;

and streamline old smallstack refactor on-stack declarations declarations to use the much neater [1] construct.
This commit is contained in:
Daniel Pouzzner
2021-01-29 17:17:31 -06:00
parent 0f6ae330da
commit a332cf36b5
7 changed files with 182 additions and 179 deletions
+2 -2
View File
@@ -177,7 +177,7 @@ int wc_AesCmacGenerate(byte* out, word32* outSz,
#ifdef WOLFSSL_SMALL_STACK
if ((cmac = (Cmac *)XMALLOC(sizeof *cmac, NULL,
DYNAMIC_TYPE_TMP_BUFFER)) == NULL)
DYNAMIC_TYPE_CMAC)) == NULL)
return MEMORY_E;
#endif
@@ -197,7 +197,7 @@ int wc_AesCmacGenerate(byte* out, word32* outSz,
#ifdef WOLFSSL_SMALL_STACK
if (cmac)
XFREE(cmac, NULL, DYNAMIC_TYPE_TMP_BUFFER);
XFREE(cmac, NULL, DYNAMIC_TYPE_CMAC);
#endif
return ret;