summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/crypto_libinit.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a mutex for the shared static storage used by YarrowKen Raeburn2004-05-011-7/+0
| | | | | | | | | | | | | | | | | | | | | | | * 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
* * crypto_libinit.h: Changed macros so you can includeTom Yu2002-06-081-3/+3
| | | | | | | crypto_libinit.h and krb5_libinit.h at the same time. [pullup from 1-2-2-branch] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14484 dc483132-0cff-0310-8789-dd5450dbe970
* Moved krb5, gss, and crypto library initialization/cleanup code into new ↵Miro Jurisic2000-01-221-0/+7
dedicated functions; added code to release global state allocated in prng.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11960 dc483132-0cff-0310-8789-dd5450dbe970