The rsa_validate_keypair_multiprime() function return is not boolean
A -ve return value from this function indicates an error which we should
treat as a failure to validate.
Fixes
@@ -245,7 +245,7 @@ int ossl_rsa_validate_pairwise(const RSA *key)
#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
}
