diff options
author | sharad3001 <46183881+sharad3001@users.noreply.github.com> | 2024-01-10 17:30:58 +0530 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-01-12 17:28:14 +0100 |
commit | d8184e982c65eee674d045da827c253c30fb59ff (patch) | |
tree | 18659f133f2a131909d735971cfa42702eb39680 /crypto | |
parent | d4d9b57530b2ecdca6b4263b5841b42c820e5275 (diff) | |
download | openssl-d8184e982c65eee674d045da827c253c30fb59ff.tar.gz |
ossl_rsa_fips186_4_gen_prob_primes(): Remove unused Xpout and Xqout
CLA: trivial
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23253)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/rsa/rsa_sp800_56b_gen.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/rsa/rsa_sp800_56b_gen.c b/crypto/rsa/rsa_sp800_56b_gen.c index bcc0fceab0..1e5cff56b9 100644 --- a/crypto/rsa/rsa_sp800_56b_gen.c +++ b/crypto/rsa/rsa_sp800_56b_gen.c @@ -30,7 +30,6 @@ * test Object used for CAVS testing only.that contains.. * p1, p2 The returned auxiliary primes for p. * If NULL they are not returned. - * Xpout An optionally returned random number used during generation of p. * Xp An optional passed in value (that is random number used during * generation of p). * Xp1, Xp2 Optionally passed in randomly generated numbers from which @@ -38,7 +37,6 @@ * are generated internally. * q1, q2 The returned auxiliary primes for q. * If NULL they are not returned. - * Xqout An optionally returned random number used during generation of q. * Xq An optional passed in value (that is random number used during * generation of q). * Xq1, Xq2 Optionally passed in randomly generated numbers from which @@ -50,7 +48,7 @@ * cb An optional BIGNUM callback. * Returns: 1 if successful, or 0 otherwise. * Notes: - * p1, p2, q1, q2, Xpout, Xqout are returned if they are not NULL. + * p1, p2, q1, q2 are returned if they are not NULL. * Xp, Xp1, Xp2, Xq, Xq1, Xq2 are optionally passed in. * (Required for CAVS testing). */ @@ -65,7 +63,6 @@ int ossl_rsa_fips186_4_gen_prob_primes(RSA *rsa, RSA_ACVP_TEST *test, BIGNUM *p1 = NULL, *p2 = NULL; BIGNUM *q1 = NULL, *q2 = NULL; /* Intermediate BIGNUMS that can be input for testing */ - BIGNUM *Xpout = NULL, *Xqout = NULL; BIGNUM *Xp = NULL, *Xp1 = NULL, *Xp2 = NULL; BIGNUM *Xq = NULL, *Xq1 = NULL, *Xq2 = NULL; @@ -105,8 +102,8 @@ int ossl_rsa_fips186_4_gen_prob_primes(RSA *rsa, RSA_ACVP_TEST *test, BN_CTX_start(ctx); tmp = BN_CTX_get(ctx); - Xpo = (Xpout != NULL) ? Xpout : BN_CTX_get(ctx); - Xqo = (Xqout != NULL) ? Xqout : BN_CTX_get(ctx); + Xpo = BN_CTX_get(ctx); + Xqo = BN_CTX_get(ctx); if (tmp == NULL || Xpo == NULL || Xqo == NULL) goto err; BN_set_flags(Xpo, BN_FLG_CONSTTIME); @@ -150,9 +147,9 @@ int ossl_rsa_fips186_4_gen_prob_primes(RSA *rsa, RSA_ACVP_TEST *test, ret = 1; err: /* Zeroize any internally generated values that are not returned */ - if (Xpo != Xpout) + if (Xpo != NULL) BN_clear(Xpo); - if (Xqo != Xqout) + if (Xqo != NULL) BN_clear(Xqo); BN_clear(tmp); |