summaryrefslogtreecommitdiffstats
path: root/providers/implementations/kdfs/x942kdf.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-06-22 12:18:56 +0200
committerMatt Caswell <matt@openssl.org>2020-07-01 12:31:45 +0200
commit0577959ceab4ca2a72a662ed12067da83cdbb3c7 (patch)
tree09503eb4175aba9f2e0ac93f418141cbe5692227 /providers/implementations/kdfs/x942kdf.c
parentX509v3_cache_extensions(): Improve coding style and doc, fix case 'sha1 == NULL' (diff)
downloadopenssl-0577959ceab4ca2a72a662ed12067da83cdbb3c7.tar.xz
openssl-0577959ceab4ca2a72a662ed12067da83cdbb3c7.zip
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 '')
-rw-r--r--providers/implementations/kdfs/x942kdf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/providers/implementations/kdfs/x942kdf.c b/providers/implementations/kdfs/x942kdf.c
index 6def5d218d..be141c0d88 100644
--- a/providers/implementations/kdfs/x942kdf.c
+++ b/providers/implementations/kdfs/x942kdf.c
@@ -255,11 +255,13 @@ static void *x942kdf_new(void *provctx)
static void x942kdf_reset(void *vctx)
{
KDF_X942 *ctx = (KDF_X942 *)vctx;
+ void *provctx = ctx->provctx;
ossl_prov_digest_reset(&ctx->digest);
OPENSSL_clear_free(ctx->secret, ctx->secret_len);
OPENSSL_clear_free(ctx->ukm, ctx->ukm_len);
memset(ctx, 0, sizeof(*ctx));
+ ctx->provctx = provctx;
}
static void x942kdf_free(void *vctx)