Fix outlen return for RSA private decrypt with WOLF_CRYPTO_CB_RSA_PAD defined

pull/8575/head
Colton Willey 2025-03-20 13:46:13 -07:00
parent 2c36ae268f
commit 4290bfb9a6
1 changed files with 3 additions and 0 deletions

View File

@ -3603,6 +3603,9 @@ static int RsaPrivateDecryptEx(const byte* in, word32 inLen, byte* out,
ret = wc_CryptoCb_RsaPad(in, inLen, out,
&outLen, rsa_type, key, rng, &padding);
if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE)) {
if (ret == 0) {
ret = (int)outLen;
}
break;
}
}