summaryrefslogtreecommitdiffstats
path: root/providers/implementations
diff options
context:
space:
mode:
authorjsondevers <jsondevers@gmail.com>2024-11-28 17:49:23 +0100
committerTomas Mraz <tomas@openssl.org>2024-12-03 11:49:33 +0100
commit4d41cc910306868285b89bd4b95d79bac693a630 (patch)
tree276a6d7866e6553db9676c9fe86fc5d2c708de3c /providers/implementations
parentfips: zeroization of ECX public keys (diff)
downloadopenssl-4d41cc910306868285b89bd4b95d79bac693a630.tar.xz
openssl-4d41cc910306868285b89bd4b95d79bac693a630.zip
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)
Diffstat (limited to 'providers/implementations')
-rw-r--r--providers/implementations/rands/seed_src_jitter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/providers/implementations/rands/seed_src_jitter.c b/providers/implementations/rands/seed_src_jitter.c
index 1a1919d823..f6f0ed54a1 100644
--- a/providers/implementations/rands/seed_src_jitter.c
+++ b/providers/implementations/rands/seed_src_jitter.c
@@ -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);