diff options
author | Matt Caswell <matt@openssl.org> | 2022-06-24 11:01:22 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-06-28 17:05:10 +0200 |
commit | 518f1ee81d5a6910365ef404888d0e119a87fd81 (patch) | |
tree | 8f203d26973b6fe192efeb37365f463ca3a0bf2d /crypto/rsa/rsa_chk.c | |
parent | 08f876d0dea184b071a5aded4c55317e5a63c80e (diff) | |
download | openssl-new-518f1ee81d5a6910365ef404888d0e119a87fd81.tar.gz |
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 #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)
Diffstat (limited to 'crypto/rsa/rsa_chk.c')
-rw-r--r-- | crypto/rsa/rsa_chk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_chk.c b/crypto/rsa/rsa_chk.c index 01fe9ead69..8ab1166874 100644 --- a/crypto/rsa/rsa_chk.c +++ b/crypto/rsa/rsa_chk.c @@ -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 } |