summaryrefslogtreecommitdiff
path: root/src/fips.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-08-21 18:34:24 +0000
committerWerner Koch <wk@gnupg.org>2008-08-21 18:34:24 +0000
commit393d3b3b0cb80223cde9be75a6a10169e37c5778 (patch)
treec0b11bfebc8687f8fe888d6502fe1eede1857ade /src/fips.c
parent2f818ed3f919a9f8f565b67007b194fa953e7d9b (diff)
downloadlibgcrypt-393d3b3b0cb80223cde9be75a6a10169e37c5778.tar.gz
Finished the X9.31 RNG implementations.
Diffstat (limited to 'src/fips.c')
-rw-r--r--src/fips.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fips.c b/src/fips.c
index c02f064a..ed4b9fd5 100644
--- a/src/fips.c
+++ b/src/fips.c
@@ -422,6 +422,10 @@ run_pubkey_selftests (void)
static int
run_random_selftests (void)
{
+ char buffer[8];
+
+ /* FIXME: For now we just try to get a few bytes. */
+ gcry_randomize (buffer, sizeof buffer, GCRY_STRONG_RANDOM);
return 0;
}
@@ -536,6 +540,7 @@ fips_new_state (enum module_states new_state)
case STATE_ERROR:
if (new_state == STATE_SHUTDOWN
+ || new_state == STATE_FATALERROR
|| new_state == STATE_INIT)
ok = 1;
break;