mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
macro guard on ECB test case and use realloc for hash
This commit is contained in:
@ -1715,13 +1715,11 @@ int _wc_Sha_Grow(byte** msg, word32* used, word32* len, const byte* in,
|
||||
*msg = (byte*)XMALLOC(*used + inSz, heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
}
|
||||
else {
|
||||
byte* pt = (byte*)XMALLOC(*used + inSz, heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
byte* pt = (byte*)XREALLOC(*msg, *used + inSz, heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (pt == NULL) {
|
||||
return MEMORY_E;
|
||||
}
|
||||
XMEMCPY(pt, *msg, *used);
|
||||
XFREE(*msg, heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
*msg = pt;
|
||||
}
|
||||
if (*msg == NULL) {
|
||||
|
@ -8462,7 +8462,7 @@ static int aes_cbc_test(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_AES_ECB
|
||||
#if defined(HAVE_AES_ECB) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
|
||||
static int aesecb_test(void)
|
||||
{
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
@ -9174,7 +9174,7 @@ WOLFSSL_TEST_SUBROUTINE int aes_test(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_AES_ECB)
|
||||
#if defined(HAVE_AES_ECB) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
|
||||
ret = aesecb_test();
|
||||
if (ret != 0)
|
||||
goto out;
|
||||
@ -38726,7 +38726,7 @@ static int myCryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_AES_CBC */
|
||||
#ifdef HAVE_AES_ECB
|
||||
#if defined(HAVE_AES_ECB) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
|
||||
if (info->cipher.type == WC_CIPHER_AES_ECB) {
|
||||
if (info->cipher.enc) {
|
||||
/* set devId to invalid, so software is used */
|
||||
|
Reference in New Issue
Block a user