mirror of
https://github.com/openssl/openssl.git
synced 2024-12-15 06:01:37 +08:00
Add handling for additional input in jitter rng
Fixes #25917 Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Hugo Landau <hlandau@devever.net> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/25966)
This commit is contained in:
parent
04812ed1de
commit
4d41cc9103
@ -194,6 +194,14 @@ static int jitter_generate(void *vseed, unsigned char *out, size_t outlen,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (adin != NULL && adin_len > 0) {
|
||||
if (!ossl_rand_pool_add(pool, adin, adin_len, 0)) {
|
||||
ERR_raise(ERR_LIB_PROV, ERR_R_RAND_LIB);
|
||||
ossl_rand_pool_free(pool);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get entropy from jitter entropy library. */
|
||||
entropy_available = ossl_prov_acquire_entropy_from_jitter(s, pool);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user