diff options
author | Miro Jurisic <meeroh@mit.edu> | 2000-01-22 04:04:36 +0000 |
---|---|---|
committer | Miro Jurisic <meeroh@mit.edu> | 2000-01-22 04:04:36 +0000 |
commit | 3954dd2c1f9919e2ac09f86f022063119b5dd8d3 (patch) | |
tree | 4918d63eb6cb7427d398d6cac70bfa325ad29025 /src/lib/crypto/crypto_libinit.c | |
parent | 41ff7485d2775407c85fb2b90b26c3170b2ad4b5 (diff) | |
download | krb5-3954dd2c1f9919e2ac09f86f022063119b5dd8d3.tar.gz krb5-3954dd2c1f9919e2ac09f86f022063119b5dd8d3.tar.xz krb5-3954dd2c1f9919e2ac09f86f022063119b5dd8d3.zip |
Moved krb5, gss, and crypto library initialization/cleanup code into new 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
Diffstat (limited to 'src/lib/crypto/crypto_libinit.c')
-rw-r--r-- | src/lib/crypto/crypto_libinit.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/lib/crypto/crypto_libinit.c b/src/lib/crypto/crypto_libinit.c new file mode 100644 index 000000000..5ae277e9e --- /dev/null +++ b/src/lib/crypto/crypto_libinit.c @@ -0,0 +1,30 @@ +#include <assert.h> + +static int initialized = false; + +/* + * Initialize the crypto library. + */ + +int cryptoint_initialize_library (void) +{ + + if (!initialized) { + initialized = true; + } + + return 0; +} + +/* + * Clean up the crypto library state + */ + +void cryptoint_cleanup_library (void) +{ + assert (initialized); + + prng_cleanup (); + + initialized = false; +}
\ No newline at end of file |