[PROV][KEYMGMT][DH][DSA] use BN_clear_free for secrets

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10631)
This commit is contained in:
Nicola Tuveri 2019-12-15 00:29:34 +02:00
parent 0d51cf3ccc
commit afa2b389bc
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ static int params_to_key(DH *dh, const OSSL_PARAM params[])
return 1;
err:
BN_free(priv_key);
BN_clear_free(priv_key);
BN_free(pub_key);
return 0;
}

View File

@ -123,7 +123,7 @@ static int params_to_key(DSA *dsa, const OSSL_PARAM params[])
return 1;
err:
BN_free(priv_key);
BN_clear_free(priv_key);
BN_free(pub_key);
return 0;
}