From 681082e6c4722bfbc4d8b4b651d62bf139c3df6b Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Thu, 4 Jul 2013 16:12:30 +0800 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; } /**