rev148: Rework _DRBG_STATE_SAVE

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2018-07-11 12:50:40 -04:00 committed by Stefan Berger
parent ec5440b03c
commit 8c9c8d322c
2 changed files with 6 additions and 3 deletions

View File

@ -121,9 +121,12 @@
//# define RSA_INSTRUMENT
#endif
/* This switch enables the RNG state save and restore */
#ifndef _DRBG_STATE_SAVE
# define _DRBG_STATE_SAVE // Comment this out if no state save is wanted
#if !(defined _DRBG_STATE_SAVE) \
|| ((_DRBG_STATE_SAVE != NO) && (_DRBG_STATE_SAVE != YES))
# undef _DRBG_STATE_SAVE
# define _DRBG_STATE_SAVE YES // Default: Either YES or NO
#endif
/* Switch added to support packed lists that leave out space associated with unimplemented
commands. Comment this out to use linear lists. */
/* NOTE: if vendor specific commands are present, the associated list is always in compressed

View File

@ -626,7 +626,7 @@ CryptRandStartup(
void
)
{
#ifndef _DRBG_STATE_SAVE
#if !_DRBG_STATE_SAVE
// If not saved in NV, re-instantiate on each startup
DRBG_Instantiate(&drbgDefault, 0, NULL);
#else