diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/crypto/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/crypto/prng.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 191142bbd..ddcca3230 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,8 @@ +2004-11-17 Ken Raeburn <raeburn@mit.edu> + + * prng.c (do_yarrow_init): Move mutex initialization here. + (krb5int_prng_init): Don't do it here. + 2004-11-15 Sam Hartman <hartmans@mit.edu> * t_prng.expected t_prng.reseedtest-expected : Update expected diff --git a/src/lib/crypto/prng.c b/src/lib/crypto/prng.c index 338eaf0dd..7656a23aa 100644 --- a/src/lib/crypto/prng.c +++ b/src/lib/crypto/prng.c @@ -63,7 +63,7 @@ int krb5int_prng_init(void) do_yarrow_init(); if (init_error) return KRB5_CRYPTO_INTERNAL; - return k5_mutex_finish_init(&yarrow_lock); + return 0; } static void do_yarrow_init(void) @@ -71,6 +71,12 @@ static void do_yarrow_init(void) unsigned i; int yerr; + yerr = k5_mutex_finish_init(&yarrow_lock); + if (yerr) { + init_error = yerr; + return; + } + yerr = krb5int_yarrow_init (&y_ctx, NULL); if ((yerr != YARROW_OK) && (yerr != YARROW_NOT_SEEDED)) { init_error = yerr; |