diff options
author | Pauli <pauli@openssl.org> | 2021-05-28 14:46:40 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-05-29 17:17:12 +1000 |
commit | 5cbd2ea3f94aa8adec9b4486ac757d4d688e3f8c (patch) | |
tree | 77ed94d8e02241ec4af496cd44e85feb26d6e01b /crypto/dsa | |
parent | 965fa9c0804dadb6f99dedbff9255a2ce6ddb640 (diff) |
add zero strenght arguments to BN and RAND RNG calls
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15513)
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_ossl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c index c16d85c9e1..86d89f4c72 100644 --- a/crypto/dsa/dsa_ossl.c +++ b/crypto/dsa/dsa_ossl.c @@ -132,7 +132,7 @@ DSA_SIG *ossl_dsa_do_sign_int(const unsigned char *dgst, int dlen, DSA *dsa) /* Generate a blinding value */ do { if (!BN_priv_rand_ex(blind, BN_num_bits(dsa->params.q) - 1, - BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY, ctx)) + BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY, 0, ctx)) goto err; } while (BN_is_zero(blind)); BN_set_flags(blind, BN_FLG_CONSTTIME); @@ -250,7 +250,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, if (!BN_generate_dsa_nonce(k, dsa->params.q, dsa->priv_key, dgst, dlen, ctx)) goto err; - } else if (!BN_priv_rand_range_ex(k, dsa->params.q, ctx)) + } else if (!BN_priv_rand_range_ex(k, dsa->params.q, 0, ctx)) goto err; } while (BN_is_zero(k)); |