diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2004-05-01 00:00:02 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2004-05-01 00:00:02 +0000 |
| commit | 5e0b254fc61c328d1ae2729b0cc7392165790f3c (patch) | |
| tree | f890511bae7b75e9c124b785ef2c142912b5de36 /src/include/socket-utils.h | |
| parent | a4f8e8baa568d752f3a4efc94827f10bd14bfc95 (diff) | |
| download | krb5-5e0b254fc61c328d1ae2729b0cc7392165790f3c.tar.gz krb5-5e0b254fc61c328d1ae2729b0cc7392165790f3c.tar.xz krb5-5e0b254fc61c328d1ae2729b0cc7392165790f3c.zip | |
Add a mutex for the shared static storage used by Yarrow
* crypto_libinit.c (initialized): Variable deleted.
(cryptoint_initialize_library, cryptoint_cleanup_library): Use new macros for
automatic shared library init/fini functions.
(prng_cleanup): Declaration deleted.
(krb5int_prng_init, krb5int_prng_cleanup): Declare.
(cryptoint_initialize_library): Call krb5int_prng_init.
(krb5int_crypto_init): New function, checks that cryptoint_initialize_library
was called successfully.
(cryptoint_cleanup_library): Call krb5int_prng_cleanup only if the initializer
ran.
* crypto_libinit.h: Deleted.
* prng.c: Include k5-thread.h.
(init_once, init_error, yarrow_lock): New variables.
(krb5int_prng_init): New function; finish initializing the mutex lock.
(do_yarrow_init): New function.
(krb5_c_random_add_entropy): Call it once only. Lock the mutex before
processing the input.
(krb5_c_random_make_octets): Lock the mutex before extracting random bytes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16290 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/socket-utils.h')
0 files changed, 0 insertions, 0 deletions
