diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-07-09 16:28:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-07-09 16:28:50 +0000 |
commit | 4dbc3a811a4468764f17c3db76a00ce30f23471a (patch) | |
tree | 01d9cf3cf051d68889c05e2101c8822d9900b145 /src/util/crypto_ksk.c | |
parent | 3b2822c3b587365589a8a98c37256ac4588d1a04 (diff) | |
download | gnunet-4dbc3a811a4468764f17c3db76a00ce30f23471a.tar.gz gnunet-4dbc3a811a4468764f17c3db76a00ce30f23471a.zip |
fix
Diffstat (limited to 'src/util/crypto_ksk.c')
-rw-r--r-- | src/util/crypto_ksk.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/util/crypto_ksk.c b/src/util/crypto_ksk.c index 4b6d72764..7dcdccd23 100644 --- a/src/util/crypto_ksk.c +++ b/src/util/crypto_ksk.c | |||
@@ -763,13 +763,7 @@ GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc) | |||
763 | } | 763 | } |
764 | 764 | ||
765 | 765 | ||
766 | /* Used to register a progress callback. This needs to be called | 766 | #ifdef gcry_register_random_progress |
767 | before any threads are created. */ | ||
768 | void | ||
769 | _gcry_register_random_progress (void (*cb)(void *,const char*,int,int,int), | ||
770 | void *cb_data ); | ||
771 | |||
772 | |||
773 | /** | 767 | /** |
774 | * Function called by libgcrypt whenever we are | 768 | * Function called by libgcrypt whenever we are |
775 | * blocked gathering entropy. | 769 | * blocked gathering entropy. |
@@ -800,10 +794,9 @@ entropy_generator (void *cls, | |||
800 | "s", | 794 | "s", |
801 | "-fprint", | 795 | "-fprint", |
802 | "/dev/null", | 796 | "/dev/null", |
803 | NULL); | 797 | NULL); |
804 | |||
805 | |||
806 | } | 798 | } |
799 | #endif | ||
807 | 800 | ||
808 | 801 | ||
809 | void __attribute__ ((constructor)) GNUNET_CRYPTO_ksk_init () | 802 | void __attribute__ ((constructor)) GNUNET_CRYPTO_ksk_init () |
@@ -820,7 +813,9 @@ void __attribute__ ((constructor)) GNUNET_CRYPTO_ksk_init () | |||
820 | #ifdef gcry_fast_random_poll | 813 | #ifdef gcry_fast_random_poll |
821 | gcry_fast_random_poll (); | 814 | gcry_fast_random_poll (); |
822 | #endif | 815 | #endif |
823 | _gcry_register_random_progress (&entropy_generator, NULL); | 816 | #ifdef gcry_register_random_progress |
817 | gcry_register_random_progress (&entropy_generator, NULL); | ||
818 | #endif | ||
824 | } | 819 | } |
825 | 820 | ||
826 | void __attribute__ ((destructor)) GNUNET_CRYPTO_ksk_fini () | 821 | void __attribute__ ((destructor)) GNUNET_CRYPTO_ksk_fini () |
@@ -833,7 +828,9 @@ void __attribute__ ((destructor)) GNUNET_CRYPTO_ksk_fini () | |||
833 | GNUNET_free (cache[i]); | 828 | GNUNET_free (cache[i]); |
834 | } | 829 | } |
835 | GNUNET_array_grow (cache, cacheSize, 0); | 830 | GNUNET_array_grow (cache, cacheSize, 0); |
836 | _gcry_register_random_progress (NULL, NULL); | 831 | #ifdef gcry_register_random_progress |
832 | gcry_register_random_progress (NULL, NULL); | ||
833 | #endif | ||
837 | } | 834 | } |
838 | 835 | ||
839 | /* end of kblockkey.c */ | 836 | /* end of kblockkey.c */ |