random: Allow DRBG_REINIT before initialization.
authorWerner Koch <wk@gnupg.org>
Fri, 19 Feb 2016 14:32:44 +0000 (15:32 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 19 Feb 2016 14:32:44 +0000 (15:32 +0100)
commit7cdbd6e6a3cf1ee366b981e148d41b1187a6fdcf
tree2c6ac61b8eb98f669f2aa62be39495a5cd26a54f
parent744b030cff61fd25114b0b25394c62782c153343
random: Allow DRBG_REINIT before initialization.

* random/random-drbg.c (DRBG_DEFAULT_TYPE): New.
(_drbg_init_internal): Set the default type if no type has been set
before.
(_gcry_rngdrbg_inititialize): Pass 0 for flags to use the default.
--

Without this change we can't call GCRYCTL_DRBG_REINIT before
intialization.

Signed-off-by: Werner Koch <wk@gnupg.org>
random/random-drbg.c