projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feeb7ec
)
Use BN_clear_free in DH_set0_key
author
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Fri, 6 Sep 2019 22:53:24 +0000
(
00:53
+0200)
committer
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Mon, 9 Sep 2019 12:43:57 +0000
(14:43 +0200)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9796)
crypto/dh/dh_lib.c
patch
|
blob
|
history
diff --git
a/crypto/dh/dh_lib.c
b/crypto/dh/dh_lib.c
index df3166279e9732d3a55271fd9ab5a873e857536e..0382e442d5a2750dd15b30dcac79580e83743ee3 100644
(file)
--- a/
crypto/dh/dh_lib.c
+++ b/
crypto/dh/dh_lib.c
@@
-235,11
+235,11
@@
void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
{
if (pub_key != NULL) {
- BN_free(dh->pub_key);
+ BN_
clear_
free(dh->pub_key);
dh->pub_key = pub_key;
}
if (priv_key != NULL) {
- BN_free(dh->priv_key);
+ BN_
clear_
free(dh->priv_key);
dh->priv_key = priv_key;
}