diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 29275e101..488a7213e 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -3601,6 +3601,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 (outPtr != NULL) { + *outPtr = out; + } if (ret == 0) { ret = (int)outLen; }