diff options
author | Pauli <paul.dale@oracle.com> | 2019-09-03 14:28:47 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-09-06 19:27:57 +1000 |
commit | f575bd2af73e19b8f317a2a857ba6d1eb0ca0c14 (patch) | |
tree | 481810fe7fc89ebced2c8c19293bd8807a4a5983 /crypto | |
parent | 232ac89ce20ee7fa466680d0da9e2514b23f7ca8 (diff) |
Clear collected_seed after freeing it
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9662)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/pkey_kdf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/evp/pkey_kdf.c b/crypto/evp/pkey_kdf.c index f4cf40e6f4..c13bb203b3 100644 --- a/crypto/evp/pkey_kdf.c +++ b/crypto/evp/pkey_kdf.c @@ -127,8 +127,10 @@ static int pkey_kdf_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) * Perform the semantics described in * EVP_PKEY_CTX_add1_tls1_prf_seed(3) */ - if (ctx->pmeth->pkey_id == NID_tls1_prf) + if (ctx->pmeth->pkey_id == NID_tls1_prf) { BUF_MEM_free(pkctx->collected_seed); + pkctx->collected_seed = NULL; + } break; case EVP_PKEY_CTRL_TLS_SEED: cmd = T_OCTET_STRING; |