diff options
author | Werner Koch <wk@gnupg.org> | 1999-01-12 11:20:24 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1999-01-12 11:20:24 +0100 |
commit | 62957ff4e73a27226c39586e3aa7a36aaea154b1 (patch) | |
tree | 6fe49a6bc4e1dcd3a0d8bebd26a7f1e7c90a5458 /cipher | |
parent | See ChangeLog: Sun Jan 10 19:36:42 CET 1999 Werner Koch (diff) | |
download | gnupg2-62957ff4e73a27226c39586e3aa7a36aaea154b1.tar.xz gnupg2-62957ff4e73a27226c39586e3aa7a36aaea154b1.zip |
See ChangeLog: Tue Jan 12 11:17:18 CET 1999 Werner Koch
Diffstat (limited to 'cipher')
-rw-r--r-- | cipher/ChangeLog | 7 | ||||
-rw-r--r-- | cipher/random.c | 7 | ||||
-rw-r--r-- | cipher/random.h | 1 | ||||
-rw-r--r-- | cipher/tiger.c | 6 |
4 files changed, 21 insertions, 0 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index ad7d6f83b..a17ed34b4 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,10 @@ +Tue Jan 12 11:17:18 CET 1999 Werner Koch <wk@isil.d.shuttle.de> + + * random.c (random_is_faked): New. + + * tiger.c: Only compile if we have the u64 type + + Sat Jan 9 16:02:23 CET 1999 Werner Koch <wk@isil.d.shuttle.de> * rndunix.c (gather_random): check for setuid. diff --git a/cipher/random.c b/cipher/random.c index 50e14aadc..b0bc832e6 100644 --- a/cipher/random.c +++ b/cipher/random.c @@ -162,6 +162,13 @@ randomize_buffer( byte *buffer, size_t length, int level ) } +int +random_is_faked() +{ + if( !is_initialized ) + initialize(); + return faked_rng || quick_test; +} /**************** * Return a pointer to a randomized buffer of level 0 and LENGTH bits diff --git a/cipher/random.h b/cipher/random.h index ca9ee3ab7..4b1d56d57 100644 --- a/cipher/random.h +++ b/cipher/random.h @@ -25,6 +25,7 @@ /*-- random.c --*/ void secure_random_alloc(void); int quick_random_gen( int onoff ); +int random_is_faked(void); void randomize_buffer( byte *buffer, size_t length, int level ); byte *get_random_bits( size_t nbits, int level, int secure ); void fast_random_poll( void ); diff --git a/cipher/tiger.c b/cipher/tiger.c index 51c6450c8..20d17cae0 100644 --- a/cipher/tiger.c +++ b/cipher/tiger.c @@ -27,6 +27,11 @@ #include "memory.h" +#ifdef HAVE_U64_TYPEDEF + +/* we really need it here, but as this is only experiment we + * can live without Tiger */ + typedef struct { u64 a, b, c; byte buf[64]; @@ -964,4 +969,5 @@ gnupgext_enum_func( int what, int *sequence, int *class, int *vers ) return ret; } +#endif /* HAVE_U64_TYPEDEF */ |