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/krb5kdf.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/krb5kdf.c')
-rw-r--r-- | providers/implementations/kdfs/krb5kdf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/providers/implementations/kdfs/krb5kdf.c b/providers/implementations/kdfs/krb5kdf.c index 4ae29a24c4..25462f3c1d 100644 --- a/providers/implementations/kdfs/krb5kdf.c +++ b/providers/implementations/kdfs/krb5kdf.c @@ -78,11 +78,13 @@ static void krb5kdf_free(void *vctx) static void krb5kdf_reset(void *vctx) { KRB5KDF_CTX *ctx = (KRB5KDF_CTX *)vctx; + void *provctx = ctx->provctx; ossl_prov_cipher_reset(&ctx->cipher); OPENSSL_clear_free(ctx->key, ctx->key_len); OPENSSL_clear_free(ctx->constant, ctx->constant_len); memset(ctx, 0, sizeof(*ctx)); + ctx->provctx = provctx; } static int krb5kdf_set_membuf(unsigned char **dst, size_t *dst_len, |