From 744cb2109b2ddd9b9305faa321bcd10746947c44 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Thu, 26 Sep 2013 11:58:02 -0400 Subject: [PATCH] Rand: check the status of the pseudorandom number generator --- Cryptlib/Rand/CryptRand.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cryptlib/Rand/CryptRand.c b/Cryptlib/Rand/CryptRand.c index 4b27595..a61c0c2 100644 --- a/Cryptlib/Rand/CryptRand.c +++ b/Cryptlib/Rand/CryptRand.c @@ -53,7 +53,11 @@ RandomSeed ( RAND_seed (DefaultSeed, sizeof (DefaultSeed)); } - return TRUE; + if (RAND_status () == 1) { + return TRUE; + } + + return FALSE; } /**