projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f608e4
)
EVP_RAND_generate: fix return check
author
Peiwei Hu
<jlu.hpw@foxmail.com>
Sun, 14 Nov 2021 15:16:57 +0000
(23:16 +0800)
committer
Tomas Mraz
<tomas@openssl.org>
Mon, 22 Nov 2021 13:43:44 +0000
(14:43 +0100)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17028)
crypto/bn/bn_rand.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_rand.c
b/crypto/bn/bn_rand.c
index baac4ea7ed8328a7fc3f58a868d88f99abfee5fb..1b495969906fc5d16263f351ab5217b76a5a569f 100644
(file)
--- a/
crypto/bn/bn_rand.c
+++ b/
crypto/bn/bn_rand.c
@@
-287,7
+287,7
@@
int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
goto err;
}
for (done = 0; done < num_k_bytes;) {
- if (
!RAND_priv_bytes_ex(libctx, random_bytes, sizeof(random_bytes), 0)
)
+ if (
RAND_priv_bytes_ex(libctx, random_bytes, sizeof(random_bytes), 0) <= 0
)
goto err;
if (!EVP_DigestInit_ex(mdctx, md, NULL)