mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
Merge pull request #9022 from lealem47/check_rsa_u
Check that u value isn't zero in RsaFunctionPrivate
This commit is contained in:
@@ -2593,7 +2593,7 @@ static int RsaFunctionPrivate(mp_int* tmp, RsaKey* key, WC_RNG* rng)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (ret == 0 && (mp_iszero(&key->p) || mp_iszero(&key->q) ||
|
if (ret == 0 && (mp_iszero(&key->p) || mp_iszero(&key->q) ||
|
||||||
mp_iszero(&key->dP) || mp_iszero(&key->dQ))) {
|
mp_iszero(&key->dP) || mp_iszero(&key->dQ) || mp_iszero(&key->u))) {
|
||||||
if (mp_exptmod(tmp, &key->d, &key->n, tmp) != MP_OKAY) {
|
if (mp_exptmod(tmp, &key->d, &key->n, tmp) != MP_OKAY) {
|
||||||
ret = MP_EXPTMOD_E;
|
ret = MP_EXPTMOD_E;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user