mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Added new CUSTOM_RAND_GENERATE_SEED_OS macro to allow custom random generation, which includes the OS_Seed. Opted to create new macro instead of modifying existing CUSTOM_RAND_GENERATE_SEED.
This commit is contained in:
@@ -985,9 +985,22 @@ static int wc_GenerateRand_IntelRD(OS_Seed* os, byte* output, word32 sz)
|
|||||||
|
|
||||||
int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||||
{
|
{
|
||||||
(void)os;
|
(void)os; /* Suppress unused arg warning */
|
||||||
return CUSTOM_RAND_GENERATE_SEED(output, sz);
|
return CUSTOM_RAND_GENERATE_SEED(output, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#elif defined(CUSTOM_RAND_GENERATE_SEED_OS)
|
||||||
|
|
||||||
|
/* Implement your own random generation function,
|
||||||
|
* which includes OS_Seed.
|
||||||
|
* Return 0 to indicate success
|
||||||
|
* int rand_gen_seed(OS_Seed* os, byte* output, word32 sz);
|
||||||
|
* #define CUSTOM_RAND_GENERATE_SEED_OS rand_gen_seed */
|
||||||
|
|
||||||
|
int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||||
|
{
|
||||||
|
return CUSTOM_RAND_GENERATE_SEED_OS(os, output, sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#elif defined(USE_WINDOWS_API)
|
#elif defined(USE_WINDOWS_API)
|
||||||
|
Reference in New Issue
Block a user