summaryrefslogtreecommitdiff
path: root/providers
diff options
context:
space:
mode:
authorNicola Tuveri <nic.tuv@gmail.com>2019-12-15 00:29:34 +0200
committerNicola Tuveri <nic.tuv@gmail.com>2020-02-18 19:11:10 +0200
commitafa2b389bc0b81a976bf79381ecc553932a090b3 (patch)
tree9d0edfb3eead0496e1f0fa2df33da6b85c6f6e3a /providers
parent0d51cf3ccc0224def10c32b6defd4a77a1b4322a (diff)
downloadopenssl-new-afa2b389bc0b81a976bf79381ecc553932a090b3.tar.gz
[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)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/keymgmt/dh_kmgmt.c2
-rw-r--r--providers/implementations/keymgmt/dsa_kmgmt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c
index 1694421c3c..0063324f48 100644
--- a/providers/implementations/keymgmt/dh_kmgmt.c
+++ b/providers/implementations/keymgmt/dh_kmgmt.c
@@ -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;
}
diff --git a/providers/implementations/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c
index 1855474c85..0781f13760 100644
--- a/providers/implementations/keymgmt/dsa_kmgmt.c
+++ b/providers/implementations/keymgmt/dsa_kmgmt.c
@@ -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;
}