diff options
author | Werner Koch <wk@gnupg.org> | 2003-01-24 10:57:50 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-01-24 10:57:50 +0000 |
commit | e4e83dba64890c5153df575d23481ddf8f1d61c0 (patch) | |
tree | afbfa3aa7b86578f5a9d5d87d9439584d253627f /src | |
parent | 05abe3889b619cb50fd66d1b30b8b684abc39fdc (diff) | |
download | libgcrypt-e4e83dba64890c5153df575d23481ddf8f1d61c0.tar.gz |
* global.c (gcry_set_progress_handler): Register a random progress
handler.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/global.c | 28 |
2 files changed, 33 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fe1c36c4..93277af7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,12 @@ +2003-01-24 Werner Koch <wk@gnupg.org> + + * global.c (gcry_set_progress_handler): Register a random progress + handler. + 2003-01-23 Werner Koch <wk@gnupg.org> * gcrypt.h (GCRY_ENABLE_QUICK_RANDOM): New. - * global.c (gcry_control): + * global.c (gcry_control): Make use of it. 2003-01-21 Werner Koch <wk@gnupg.org> @@ -463,7 +468,7 @@ Tue Dec 8 13:15:16 CET 1998 Werner Koch <wk@isil.d.shuttle.de> * mpiapi.c: New - Copyright 1998,1999,2000,2001,2002 Free Software Foundation, Inc. + Copyright 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without diff --git a/src/global.c b/src/global.c index 3ba85d36..4985d01d 100644 --- a/src/global.c +++ b/src/global.c @@ -1,5 +1,5 @@ /* global.c - global control functions - * Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -223,7 +223,7 @@ gcry_control( enum gcry_ctl_cmds cmd, ... ) case GCRYCTL_DISABLE_INTERNAL_LOCKING: global_init (); - /* We wase some bytes by doing it this way. OTOH this + /* We waste some bytes by doing it this way. OTOH this function is not anymore required becuase it is done automagically. */ ath_deinit (); @@ -581,6 +581,29 @@ _gcry_get_debug_flag( unsigned int mask ) of progress currently done and TOTAL the expected amount of progress. A value of 0 for TOTAL indicates that there is no estimation available. + + Defined values for WHAT: + + "need_entropy" X 0 number-of-bytes-required + When running low on entropy + "primegen" '\n' 0 0 + Prime generated + '!' + Need to refresh the prime pool + '<','>' + Number of bits adjusted + '^' + Looking for a generator + '.' + Fermat tests on 10 candidates failed + ':' + Restart with a new random value + '+' + Rabin Miller test passed + "pk_elg" '+','-','.','\n' 0 0 + Only used in debugging mode. + "pk_dsa" + Only used in debugging mode. */ void gcry_set_progress_handler (void (*cb)(void *,const char*,int, int, int), @@ -589,4 +612,5 @@ gcry_set_progress_handler (void (*cb)(void *,const char*,int, int, int), _gcry_register_pk_dsa_progress (cb, cb_data); _gcry_register_pk_elg_progress (cb, cb_data); _gcry_register_primegen_progress (cb, cb_data); + _gcry_register_random_progress (cb, cb_data); } |