]> git.ipfire.org Git - thirdparty/openssl.git/commit - crypto/rand/drbg_ctr.c
RAND_DRBG: add a function for setting the reseeding defaults
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 9 Mar 2018 17:24:23 +0000 (18:24 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 9 Mar 2018 23:26:30 +0000 (00:26 +0100)
commit4917e91160fac2acef543ad6a74b2da2e1f17625
tree9ed417f5b763ac89a8481de642a95c10acc20739
parent9ad9794273f3d069e45cf505fbeaada073a849ce
RAND_DRBG: add a function for setting the reseeding defaults

The introduction of thread local public and private DRBG instances (#5547)
makes it very cumbersome to change the reseeding (time) intervals for
those instances. This commit provides a function to set the default
values for all subsequently created DRBG instances.

 int RAND_DRBG_set_reseed_defaults(
                                   unsigned int master_reseed_interval,
                                   unsigned int slave_reseed_interval,
                                   time_t master_reseed_time_interval,
                                   time_t slave_reseed_time_interval
                                   );

The function is intended only to be used during application initialization,
before any threads are created and before any random bytes are generated.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5576)
crypto/rand/drbg_ctr.c
crypto/rand/drbg_lib.c
include/internal/rand.h
util/libcrypto.num