From 3983f30bd2f671d4f7c5bbe39a1d6a7b191f2af5 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 17 May 1999 20:03:24 +0000 Subject: See ChangeLog: Mon May 17 21:54:43 CEST 1999 Werner Koch --- cipher/ChangeLog | 4 ++++ cipher/dynload.c | 4 ++++ cipher/random.c | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'cipher') diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 34d30af24..e755d022b 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,7 @@ +Mon May 17 21:54:43 CEST 1999 Werner Koch + + * dynload.c (register_internal_cipher_extension): Minor init fix. + Tue May 4 15:47:53 CEST 1999 Werner Koch * primegen.c (gen_prime): Readded the Fermat test. Fixed the bug diff --git a/cipher/dynload.c b/cipher/dynload.c index 318867796..ae3de3f5d 100644 --- a/cipher/dynload.c +++ b/cipher/dynload.c @@ -170,7 +170,11 @@ register_internal_cipher_extension( } /* and register */ el->enumfunc = enumfunc; + #ifdef HAVE_DL_OPEN el->handle = (void*)1; + #else + el->handle = 1; + #endif el->next = extensions; extensions = el; } diff --git a/cipher/random.c b/cipher/random.c index 396e1dbd9..eb4fdf793 100644 --- a/cipher/random.c +++ b/cipher/random.c @@ -304,10 +304,12 @@ read_pool( byte *buffer, size_t length, int level ) static void add_randomness( const void *buffer, size_t length, int source ) { + const byte *p = buffer; + if( !is_initialized ) initialize(); while( length-- ) { - rndpool[pool_writepos++] = *((byte*)buffer)++; + rndpool[pool_writepos++] = *p++; if( pool_writepos >= POOLSIZE ) { if( source > 1 ) pool_filled = 1; -- cgit v1.2.3