summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-08-22 19:17:05 +0000
committerWerner Koch <wk@gnupg.org>2008-08-22 19:17:05 +0000
commit8773461c06ced4014ce2913b2621987c601a9ac0 (patch)
tree72d661ad427db4b6107b263a37025682c4ea4470 /src/global.c
parent393d3b3b0cb80223cde9be75a6a10169e37c5778 (diff)
downloadlibgcrypt-8773461c06ced4014ce2913b2621987c601a9ac0.tar.gz
Completed the RNG implementaion switching.
Added framework for running RNG tests. Added an experimental option --enable-hmac-binary-check to configure. --This line, and those below, will be ignored-- M src/fips.c M src/cipher-proto.h M src/global.c M src/hmac256.c M src/ChangeLog M src/hmac256.h M src/Makefile.am M tests/Makefile.am M configure.ac M doc/gcrypt.texi M random/random-fips.c M random/random.c M random/rand-internal.h M random/random.h M random/ChangeLog M ChangeLog M README
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/global.c b/src/global.c
index ed4e4807..2b7f0bcc 100644
--- a/src/global.c
+++ b/src/global.c
@@ -349,7 +349,8 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr)
break;
case GCRYCTL_UPDATE_RANDOM_SEED_FILE:
- _gcry_update_random_seed_file ();
+ if ( fips_is_operational () )
+ _gcry_update_random_seed_file ();
break;
case GCRYCTL_SET_VERBOSITY:
@@ -405,7 +406,9 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr)
/* We need to do make sure that the random pool is really
initialized so that the poll function is not a NOP. */
_gcry_random_initialize (1);
- _gcry_fast_random_poll ();
+
+ if ( fips_is_operational () )
+ _gcry_fast_random_poll ();
break;
case GCRYCTL_SET_RNDEGD_SOCKET: