mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-20 19:56:35 +00:00
rev148: Rework _DRBG_STATE_SAVE
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
ec5440b03c
commit
8c9c8d322c
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user