From: Dr. Matthias St. Pierre Date: Mon, 29 Apr 2019 17:12:38 +0000 (+0200) Subject: FIPS: Fix compiler errors in rsa_chk.c when building with `-DFIPS_MODE` X-Git-Tag: openssl-3.0.0-alpha1~2119 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=96384e613ae7092fb6f63daa69a9601d128416b2;p=oweals%2Fopenssl.git FIPS: Fix compiler errors in rsa_chk.c when building with `-DFIPS_MODE` Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/8843) --- diff --git a/crypto/rsa/rsa_chk.c b/crypto/rsa/rsa_chk.c index 4f65dfa64b..96a13b3330 100644 --- a/crypto/rsa/rsa_chk.c +++ b/crypto/rsa/rsa_chk.c @@ -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;