wolfcrypt/src/random.c: in wc_RNG_GenerateBlock(), when WC_RNG_SEED_CB, use seedCb rather than wc_GenerateSeed (crucial bug fix for linuxkm).
This commit is contained in:
@@ -1000,8 +1000,15 @@ int wc_RNG_GenerateBlock(WC_RNG* rng, byte* output, word32 sz)
|
||||
if (wc_RNG_HealthTestLocal(1) == 0) {
|
||||
byte newSeed[SEED_SZ + SEED_BLOCK_SZ];
|
||||
|
||||
#ifdef WC_RNG_SEED_CB
|
||||
if (seedCb == NULL)
|
||||
ret = DRBG_NO_SEED_CB;
|
||||
else
|
||||
ret = seedCb(&rng->seed, newSeed, SEED_SZ + SEED_BLOCK_SZ);
|
||||
#else
|
||||
ret = wc_GenerateSeed(&rng->seed, newSeed,
|
||||
SEED_SZ + SEED_BLOCK_SZ);
|
||||
#endif
|
||||
if (ret != 0)
|
||||
ret = DRBG_FAILURE;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user