Skip to content

Commit

Permalink
FIPS: Fix compiler errors in rsa_chk.c when building with -DFIPS_MODE
Browse files Browse the repository at this point in the history
Reviewed-by: Richard Levitte <[email protected]>
(Merged from openssl#8843)
  • Loading branch information
mspncp committed Apr 30, 2019
1 parent 8f0dd6d commit 96384e6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crypto/rsa/rsa_chk.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ int RSA_check_key(const RSA *key)
int RSA_check_key_ex(const RSA *key, BN_GENCB *cb)
{
#ifdef FIPS_MODE
if (!(rsa_sp800_56b_check_public(key)
&& rsa_sp800_56b_check_private(key)
&& rsa_sp800_56b_check_keypair(key, NULL, -1, RSA_bits(key))
return 0;

return rsa_sp800_56b_check_public(key)
&& rsa_sp800_56b_check_private(key)
&& rsa_sp800_56b_check_keypair(key, NULL, -1, RSA_bits(key));
#else
BIGNUM *i, *j, *k, *l, *m;
BN_CTX *ctx;
Expand Down

0 comments on commit 96384e6

Please sign in to comment.