A -ve return value from this function indicates an error which we should
treat as a failure to validate.
Fixes #18538
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18651)
#ifdef FIPS_MODULE
return ossl_rsa_sp800_56b_check_keypair(key, NULL, -1, RSA_bits(key));
#else
- return rsa_validate_keypair_multiprime(key, NULL);
+ return rsa_validate_keypair_multiprime(key, NULL) > 0;
#endif
}