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/sm2 | |
parent | 965fa9c0804dadb6f99dedbff9255a2ce6ddb640 (diff) | |
download | openssl-5cbd2ea3f94aa8adec9b4486ac757d4d688e3f8c.tar.gz |
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/sm2')
-rw-r--r-- | crypto/sm2/sm2_crypt.c | 2 | ||||
-rw-r--r-- | crypto/sm2/sm2_sign.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/sm2/sm2_crypt.c b/crypto/sm2/sm2_crypt.c index 2b8b10e25d..f2771dbe73 100644 --- a/crypto/sm2/sm2_crypt.c +++ b/crypto/sm2/sm2_crypt.c @@ -187,7 +187,7 @@ int ossl_sm2_encrypt(const EC_KEY *key, memset(ciphertext_buf, 0, *ciphertext_len); - if (!BN_priv_rand_range_ex(k, order, ctx)) { + if (!BN_priv_rand_range_ex(k, order, 0, ctx)) { ERR_raise(ERR_LIB_SM2, ERR_R_INTERNAL_ERROR); goto done; } diff --git a/crypto/sm2/sm2_sign.c b/crypto/sm2/sm2_sign.c index d9e16e1f98..907d6585ea 100644 --- a/crypto/sm2/sm2_sign.c +++ b/crypto/sm2/sm2_sign.c @@ -240,7 +240,7 @@ static ECDSA_SIG *sm2_sig_gen(const EC_KEY *key, const BIGNUM *e) } for (;;) { - if (!BN_priv_rand_range_ex(k, order, ctx)) { + if (!BN_priv_rand_range_ex(k, order, 0, ctx)) { ERR_raise(ERR_LIB_SM2, ERR_R_INTERNAL_ERROR); goto done; } |