mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 21:11:03 +03:00
[rng] Record validity within DRBG state
Treat an empty (zeroed) DRBG as invalid. This ensures that a DRBG that has not yet been instantiated (or that has been uninstantiated) will refuse to attempt to generate random bits. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -39,6 +39,8 @@ struct drbg_state {
|
||||
struct hmac_drbg_state internal;
|
||||
/** Reseed required flag */
|
||||
int reseed_required;
|
||||
/** State is valid */
|
||||
int valid;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user