diff options
author | Matt Caswell <matt@openssl.org> | 2020-06-22 11:18:56 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-07-01 11:31:45 +0100 |
commit | 0577959ceab4ca2a72a662ed12067da83cdbb3c7 (patch) | |
tree | 09503eb4175aba9f2e0ac93f418141cbe5692227 /providers/implementations/kdfs/hkdf.c | |
parent | b4cb9498c9c76877a354316ba4246afbea178c83 (diff) |
Don't forget our provider ctx when resetting
A number of the KDF reset functions were resetting a little too much
Fixes #12225
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12229)
Diffstat (limited to 'providers/implementations/kdfs/hkdf.c')
-rw-r--r-- | providers/implementations/kdfs/hkdf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/providers/implementations/kdfs/hkdf.c b/providers/implementations/kdfs/hkdf.c index 77f4f2c8cc..0b1a6e9b7e 100644 --- a/providers/implementations/kdfs/hkdf.c +++ b/providers/implementations/kdfs/hkdf.c @@ -90,12 +90,14 @@ static void kdf_hkdf_free(void *vctx) static void kdf_hkdf_reset(void *vctx) { KDF_HKDF *ctx = (KDF_HKDF *)vctx; + void *provctx = ctx->provctx; ossl_prov_digest_reset(&ctx->digest); OPENSSL_free(ctx->salt); OPENSSL_clear_free(ctx->key, ctx->key_len); OPENSSL_cleanse(ctx->info, ctx->info_len); memset(ctx, 0, sizeof(*ctx)); + ctx->provctx = provctx; } static size_t kdf_hkdf_size(KDF_HKDF *ctx) |