summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-11-08 21:56:04 +0100
committerRich Salz <rsalz@openssl.org>2016-11-08 23:20:13 +0100
commite5e71f2857275189577ab7b227608ab4ec985471 (patch)
treed201da7627b2cea2fa5e60562f0e3d33991f65ef /crypto/bn
parentFix zlib BIO_METHOD for latest BIO_METHOD structure changes (diff)
downloadopenssl-e5e71f2857275189577ab7b227608ab4ec985471.tar.xz
openssl-e5e71f2857275189577ab7b227608ab4ec985471.zip
Zero stack variable with DSA nonce
Thanks to Falko Strenzke for bringing this to our attention. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1882)
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn_rand.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c
index c577fd169d..9ce4c5f606 100644
--- a/crypto/bn/bn_rand.c
+++ b/crypto/bn/bn_rand.c
@@ -253,5 +253,6 @@ int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
err:
OPENSSL_free(k_bytes);
+ OPENSSL_cleanse(private_bytes, sizeof(private_bytes));
return ret;
}