Merge pull request #8575 from ColtonWilley/fix_cryptocb_rsa_pad_ret_len

Fix outlen return for RSA private decrypt with WOLF_CRYPTO_CB_RSA_PAD
This commit is contained in:
David Garske
2025-03-20 19:03:25 -07:00
committed by GitHub

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;
}
}