Merge pull request #9459 from JacobBarthelmeh/async

fix small stack define and warnings for g++ build with async
This commit is contained in:
David Garske
2025-11-25 14:22:24 -08:00
committed by GitHub
4 changed files with 3 additions and 14 deletions

View File

@@ -175,7 +175,7 @@ int BuildTlsFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
byte handshake_hash[HSHASH_SZ];
#else
byte* handshake_hash = NULL;
handshake_hash = XMALLOC(HSHASH_SZ, ssl->heap, DYNAMIC_TYPE_DIGEST);
handshake_hash = (byte*)XMALLOC(HSHASH_SZ, ssl->heap, DYNAMIC_TYPE_DIGEST);
if (handshake_hash == NULL)
return MEMORY_E;
#endif
@@ -404,7 +404,7 @@ static int _DeriveTlsKeys(byte* key_dig, word32 key_dig_len,
int ret;
#if defined(WOLFSSL_ASYNC_CRYPT) && !defined(WC_ASYNC_NO_HASH)
byte* seed = NULL;
seed = XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
seed = (byte*)XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
if (seed == NULL)
return MEMORY_E;
#else
@@ -504,7 +504,7 @@ static int _MakeTlsMasterSecret(byte* ms, word32 msLen,
byte seed[SEED_LEN];
#else
byte* seed = NULL;
seed = XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
seed = (byte*)XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
if (seed == NULL)
return MEMORY_E;
#endif

View File

@@ -28,10 +28,6 @@
#include <wolfcrypt/src/misc.c>
#endif
#ifdef WOLFSSL_ASYNC_CRYPT
#define WOLFSSL_SMALL_STACK
#endif
#include <wolfssl/wolfcrypt/rsa.h>
#include <wolfssl/wolfcrypt/types.h>
#include <tests/api/api.h>

View File

@@ -69,9 +69,6 @@
/* Macro to disable benchmark */
#ifndef NO_CRYPT_BENCHMARK
#ifdef WOLFSSL_ASYNC_CRYPT
#define WOLFSSL_SMALL_STACK
#endif
#define WC_ALLOC_DO_ON_FAILURE() do { printf("out of memory at benchmark.c L %d\n", __LINE__); ret = MEMORY_E; goto exit; } while (0)
#include <wolfssl/wolfcrypt/types.h>

View File

@@ -43,10 +43,6 @@
#define WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
#endif
#ifdef WOLFSSL_ASYNC_CRYPT
#define WOLFSSL_SMALL_STACK
#endif
#if !defined(NO_CRYPT_TEST) || defined(WC_TEST_EXPORT_SUBTESTS)
#include <wolfssl/version.h>