Skip to content

Commit acc6ff8

Browse files
author
Lealem Amedie
committed
Move rng seed cb call to wolfcrypt_test
1 parent 9bc0e31 commit acc6ff8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

wolfcrypt/test/test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,10 @@ wc_test_ret_t wolfcrypt_test(void* args)
996996
heap_baselineBytes = wolfCrypt_heap_peakBytes_checkpoint();
997997
#endif
998998

999+
#ifdef WC_RNG_SEED_CB
1000+
wc_SetSeed_Cb(wc_GenerateSeed);
1001+
#endif
1002+
9991003
printf("------------------------------------------------------------------------------\n");
10001004
printf(" wolfSSL version %s\n", LIBWOLFSSL_VERSION_STRING);
10011005
#ifdef WOLF_CRYPTO_CB
@@ -2094,10 +2098,6 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
20942098
printf("Math: %s\n", wc_GetMathInfo());
20952099
#endif
20962100

2097-
#ifdef WC_RNG_SEED_CB
2098-
wc_SetSeed_Cb(wc_GenerateSeed);
2099-
#endif
2100-
21012101
#ifdef HAVE_STACK_SIZE
21022102
StackSizeCheck(&args, wolfcrypt_test);
21032103
#else

wolfssl/wolfcrypt/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
* system or other set of headers included by wolfSSL already defines
389389
* RNG. Examples are:
390390
* wolfEngine, wolfProvider and potentially other use-cases */
391-
#ifndef RNG
391+
#if !defined(RNG) && !defined(NO_OLD_RNGNAME)
392392
#define RNG WC_RNG
393393
#endif
394394
#endif

0 commit comments

Comments
 (0)