From 0fa9ffe75c210cdc3d0e87744bbac08d1637ac84 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 8 Aug 2001 12:34:00 +0000 Subject: Fixes here and there. --- THANKS | 2 ++ TODO | 10 ++++++---- cipher/ChangeLog | 10 ++++++++++ cipher/random.c | 5 ++--- cipher/rndw32.c | 14 ++++++++------ doc/ChangeLog | 8 ++++++++ doc/gpg.sgml | 12 +++++++----- g10/ChangeLog | 8 ++++++++ g10/keygen.c | 15 +++++++++------ g10/trustdb.c | 2 +- 10 files changed, 61 insertions(+), 25 deletions(-) diff --git a/THANKS b/THANKS index 8eb405b66..68b6c8e0d 100644 --- a/THANKS +++ b/THANKS @@ -108,6 +108,7 @@ L. Sassaman rabbi@quickie.net M Taylor mctaylor@privacy.nb.ca Marcel Waldvogel mwa@arl.wustl.edu Marco d'Itri md@linux.it +Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de Mark Adler madler@alumni.caltech.edu Mark Elbrecht snowball3@bigfoot.com Markus Friedl Markus.Friedl@informatik.uni-erlangen.de @@ -152,6 +153,7 @@ Roger Sondermann r.so@bigfoot.com Roland Rosenfeld roland@spinnaker.rhein.de Ross Golder rossigee@bigfoot.com Sam Roberts sam@cogent.ca +Sami Tolvanen sami@tolvanen.com Sean MacLennan seanm@netwinder.org Serge Munhoven munhoven@mema.ucl.ac.be SL Baur steve@xemacs.org diff --git a/TODO b/TODO index 4dd1fbede..401cbd258 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,7 @@ - * autogen.sh --build-w32, get that code from mingw32 so we can - better maintain it. + * add listing of notation data + + * Check the changes to the gpg random agtherer on all W32 platforms. * Check that a key signature can be revoked and later be signed again. @@ -12,8 +13,9 @@ * Show more info does not work from edit->trust * keyedit_menu: We first look for a secret key and then for a public - key. This is bad we must match the keys. Better check all places were - we match keys. build_sig_packet: implement update for sig-creation. + key. This is bad we must match the keys. Better check all places + were we match keys. build_sig_packet: implement update for + sig-creation. * set default charset from nl_langinfo. diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 14f76185f..2329dfe4b 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,13 @@ +2001-08-08 Werner Koch + + * rndw32.c (gather_random): Use toolhelp in addition to the NT + gatherer for Windows2000. Suggested by Sami Tolvanen. + + * random.c (read_pool): Fixed length check, this used to be one + byte to strict. Made an assert out of it because the caller has + already made sure that only poolsize bytes are requested. + Reported by Marcus Brinkmann. + 2001-07-18 Werner Koch * rndlinux.c (gather_random): casted a size_t arg to int so that diff --git a/cipher/random.c b/cipher/random.c index 198663536..ffafd9a87 100644 --- a/cipher/random.c +++ b/cipher/random.c @@ -423,9 +423,8 @@ read_pool( byte *buffer, size_t length, int level ) int i; ulong *sp, *dp; - if( length >= POOLSIZE ) { - log_fatal(_("too many random bits requested; the limit is %d\n"), - POOLSIZE*8-1 ); + if( length > POOLSIZE ) { + log_bug("too many random bits requested\n"); } if( !pool_filled ) { diff --git a/cipher/rndw32.c b/cipher/rndw32.c index 63b78791c..278ea8ec2 100644 --- a/cipher/rndw32.c +++ b/cipher/rndw32.c @@ -730,7 +730,7 @@ gather_random( void (*add)(const void*, size_t, int), int requester, size_t length, int level ) { static int is_initialized; - static int is_windows95; + static int is_windowsNT, has_toolhelp; if( !level ) @@ -748,7 +748,9 @@ gather_random( void (*add)(const void*, size_t, int), int requester, GetVersionEx( &osvi ); platform = osvi.dwPlatformId; - is_windows95 = platform == VER_PLATFORM_WIN32_WINDOWS; + is_windowsNT = platform == VER_PLATFORM_WIN32_NT; + has_toolhelp = (platform == VER_PLATFORM_WIN32_WINDOWS + || (is_windowsNT && osvi.dwMajorVersion >= 5)); if ( platform == VER_PLATFORM_WIN32s ) { g10_log_fatal("can't run on a W32s platform\n" ); @@ -763,11 +765,11 @@ gather_random( void (*add)(const void*, size_t, int), int requester, log_debug ("rndw32#gather_random: req=%d len=%u lvl=%d\n", requester, (unsigned int)length, level ); - if (is_windows95 ) { - slow_gatherer_windows95( add, requester ); + if ( has_toolhelp ) { + slow_gatherer_windows95 ( add, requester ); } - else { - slow_gatherer_windowsNT( add, requester ); + if ( is_windowsNT ) { + slow_gatherer_windowsNT ( add, requester ); } return 0; diff --git a/doc/ChangeLog b/doc/ChangeLog index 84bfcd55c..b099702e7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2001-08-08 Werner Koch + + * gpg.sgml: Documented --print-mds and marked the --print-md * as + deprecated because it does not work in the W32 version. Suggested + by John Kane. + (WARNINGS): Typo fix. + (--with-colons): Clarified that the output is in UTF-8. + 2001-08-01 Werner Koch * gpg.sgml: Added --ignore-valid-from diff --git a/doc/gpg.sgml b/doc/gpg.sgml index bf0836588..57c3f4400 100644 --- a/doc/gpg.sgml +++ b/doc/gpg.sgml @@ -522,10 +522,11 @@ values will be overwritten. --print-md algo &OptParmFiles; +--print-mds &OptParmFiles; -Print message digest of algorithm ALGO for all given files of stdin. -If "*" is used for the algorithm, digests for all available algorithms -are printed. +Print message digest of algorithm ALGO for all given files or stdin. +With the second form (or a deprecated "*" as algo) digests for all +available algorithms are printed. @@ -1376,7 +1377,8 @@ verification is not needed. --with-colons -Print key listings delimited by colons. +Print key listings delimited by colons. Note, that the output will be +encoded in UTF-8 regardless of any --charset setting. @@ -1760,7 +1762,7 @@ is *very* easy to spy out your passphrase! If you are going to verify detached signatures, make sure that the -program nows about it; either be giving both filenames on the +program knows about it; either be giving both filenames on the commandline or using - to specify stdin. diff --git a/g10/ChangeLog b/g10/ChangeLog index 14f284d88..f1b5f9f46 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,11 @@ +2001-08-08 Werner Koch + + * keygen.c (ask_keysize): Do not print the notes about suggested + key sizes if just a DSA key is generated. + + * trustdb.c (add_ultimate_key): s/log_error/log_info/ for + duplicated inserted trusted keys. + 2001-08-07 Werner Koch * sign.c (sleep): Redefine for W32. diff --git a/g10/keygen.c b/g10/keygen.c index dad42a690..5a9145bcb 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -603,11 +603,14 @@ ask_keysize( int algo ) char *answer; unsigned nbits; - tty_printf(_("About to generate a new %s keypair.\n" - " minimum keysize is 768 bits\n" - " default keysize is 1024 bits\n" - " highest suggested keysize is 2048 bits\n"), - pubkey_algo_to_string(algo) ); + if (algo != PUBKEY_ALGO_DSA) { + tty_printf (_("About to generate a new %s keypair.\n" + " minimum keysize is 768 bits\n" + " default keysize is 1024 bits\n" + " highest suggested keysize is 2048 bits\n"), + pubkey_algo_to_string(algo) ); + } + for(;;) { answer = cpr_get("keygen.size", _("What keysize do you want? (1024) ")); @@ -885,7 +888,7 @@ ask_user_id( int mode ) } for(;;) { - char *ansstr = _("NnCcEeOoQq"); + const char *ansstr = _("NnCcEeOoQq"); if( strlen(ansstr) != 10 ) BUG(); diff --git a/g10/trustdb.c b/g10/trustdb.c index cfbb8a3c9..696db3c0e 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -513,7 +513,7 @@ add_ultimate_key( PKT_public_key *pk, u32 *keyid ) (ulong)keyid[1], pk->local_id ); if( ins_lid_table_item( ultikey_table, pk->local_id, 0 ) ) - log_error(_("key %08lX: already in trusted key table\n"), + log_info(_("key %08lX: already in trusted key table\n"), (ulong)keyid[1]); else if( opt.verbose > 1 ) log_info(_("key %08lX: accepted as trusted key.\n"), -- cgit v1.2.3