diff options
Diffstat (limited to 'fips/rand/fips_drbg_hash.c')
-rw-r--r-- | fips/rand/fips_drbg_hash.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fips/rand/fips_drbg_hash.c b/fips/rand/fips_drbg_hash.c index 4dbcdb6a7b..ca3bce7320 100644 --- a/fips/rand/fips_drbg_hash.c +++ b/fips/rand/fips_drbg_hash.c @@ -306,6 +306,13 @@ static int drbg_hash_generate(DRBG_CTX *dctx, return 1; } +static int drbg_hash_uninstantiate(DRBG_CTX *dctx) + { + EVP_MD_CTX_cleanup(&dctx->d.hash.mctx); + OPENSSL_cleanse(&dctx->d.hash, sizeof(DRBG_HASH_CTX)); + return 1; + } + int fips_drbg_hash_init(DRBG_CTX *dctx) { const EVP_MD *md; @@ -346,6 +353,7 @@ int fips_drbg_hash_init(DRBG_CTX *dctx) dctx->instantiate = drbg_hash_instantiate; dctx->reseed = drbg_hash_reseed; dctx->generate = drbg_hash_generate; + dctx->uninstantiate = drbg_hash_uninstantiate; dctx->d.hash.md = md; EVP_MD_CTX_init(&hctx->mctx); |