Skip to content

Commit 0aaa31c

Browse files
authored
Merge pull request #9459 from JacobBarthelmeh/async
fix small stack define and warnings for g++ build with async
2 parents 6fc99ac + a83fb4f commit 0aaa31c

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

src/tls.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ int BuildTlsFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
175175
byte handshake_hash[HSHASH_SZ];
176176
#else
177177
byte* handshake_hash = NULL;
178-
handshake_hash = XMALLOC(HSHASH_SZ, ssl->heap, DYNAMIC_TYPE_DIGEST);
178+
handshake_hash = (byte*)XMALLOC(HSHASH_SZ, ssl->heap, DYNAMIC_TYPE_DIGEST);
179179
if (handshake_hash == NULL)
180180
return MEMORY_E;
181181
#endif
@@ -404,7 +404,7 @@ static int _DeriveTlsKeys(byte* key_dig, word32 key_dig_len,
404404
int ret;
405405
#if defined(WOLFSSL_ASYNC_CRYPT) && !defined(WC_ASYNC_NO_HASH)
406406
byte* seed = NULL;
407-
seed = XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
407+
seed = (byte*)XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
408408
if (seed == NULL)
409409
return MEMORY_E;
410410
#else
@@ -504,7 +504,7 @@ static int _MakeTlsMasterSecret(byte* ms, word32 msLen,
504504
byte seed[SEED_LEN];
505505
#else
506506
byte* seed = NULL;
507-
seed = XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
507+
seed = (byte*)XMALLOC(SEED_LEN, heap, DYNAMIC_TYPE_SEED);
508508
if (seed == NULL)
509509
return MEMORY_E;
510510
#endif

tests/api/test_rsa.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
#include <wolfcrypt/src/misc.c>
2929
#endif
3030

31-
#ifdef WOLFSSL_ASYNC_CRYPT
32-
#define WOLFSSL_SMALL_STACK
33-
#endif
34-
3531
#include <wolfssl/wolfcrypt/rsa.h>
3632
#include <wolfssl/wolfcrypt/types.h>
3733
#include <tests/api/api.h>

wolfcrypt/benchmark/benchmark.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@
6969
/* Macro to disable benchmark */
7070
#ifndef NO_CRYPT_BENCHMARK
7171

72-
#ifdef WOLFSSL_ASYNC_CRYPT
73-
#define WOLFSSL_SMALL_STACK
74-
#endif
7572
#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)
7673

7774
#include <wolfssl/wolfcrypt/types.h>

wolfcrypt/test/test.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343
#define WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
4444
#endif
4545

46-
#ifdef WOLFSSL_ASYNC_CRYPT
47-
#define WOLFSSL_SMALL_STACK
48-
#endif
49-
5046
#if !defined(NO_CRYPT_TEST) || defined(WC_TEST_EXPORT_SUBTESTS)
5147

5248
#include <wolfssl/version.h>

0 commit comments

Comments
 (0)