From c5fb83f52d12c918e2b005a8c25ee90717e942f9 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 21 Nov 2025 13:12:20 -0700 Subject: [PATCH 1/2] fix warnings for g++ build with async --- src/tls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tls.c b/src/tls.c index 3004bc328..976150ef8 100644 --- a/src/tls.c +++ b/src/tls.c @@ -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 From a83fb4fc42835568879b4d77a9ce806e4f146b32 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Tue, 25 Nov 2025 00:43:04 -0700 Subject: [PATCH 2/2] revert 6bda10a forcing small stack with async --- tests/api/test_rsa.c | 4 ---- wolfcrypt/benchmark/benchmark.c | 3 --- wolfcrypt/test/test.c | 4 ---- 3 files changed, 11 deletions(-) diff --git a/tests/api/test_rsa.c b/tests/api/test_rsa.c index 40786e467..97354217e 100644 --- a/tests/api/test_rsa.c +++ b/tests/api/test_rsa.c @@ -28,10 +28,6 @@ #include #endif -#ifdef WOLFSSL_ASYNC_CRYPT - #define WOLFSSL_SMALL_STACK -#endif - #include #include #include diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index fbce752ee..797e64e6b 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -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 diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index a6a5bf494..f014297a6 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -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