diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 1a9124df6..6b3899099 100755 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -4195,7 +4195,7 @@ void bench_rsaKeyGen_size(int doAsync, int keySz) #define RSA_BUF_SIZE 384 /* for up to 3072 bit */ #if !defined(WOLFSSL_RSA_VERIFY_INLINE) && !defined(WOLFSSL_RSA_PUBLIC_ONLY) -#elif defined(WOLFSSL_PUBLIC_MP) +#elif defined(WOLFSSL_PUBLIC_MP) || !defined(WOLFSSL_RSA_PUBLIC_ONLY) #if defined(USE_CERT_BUFFERS_2048) static unsigned char rsa_2048_sig[] = { 0x8c, 0x9e, 0x37, 0xbf, 0xc3, 0xa6, 0xba, 0x1c, diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 927dfb7b0..c69833ee9 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -2677,8 +2677,7 @@ static int RsaPrivateDecryptEx(byte* in, word32 inLen, byte* out, ret = wc_RsaFunction(key->data, inLen, key->data, &key->dataLen, rsa_type, key, rng); #else - ret = wc_RsaFunction(out, inLen, out, &key->dataLen, rsa_type, key, - rng); + ret = wc_RsaFunction(in, inLen, out, &key->dataLen, rsa_type, key, rng); #endif if (ret >= 0 || ret == WC_PENDING_E) { @@ -2705,13 +2704,13 @@ static int RsaPrivateDecryptEx(byte* in, word32 inLen, byte* out, if (rsa_type == RSA_PUBLIC_DECRYPT && ret > (int)outLen) ret = RSA_BUFFER_E; else if (ret >= 0 && pad != NULL) { -#if !defined(WOLFSSL_RSA_VERIFY_ONLY) +#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(WOLFSSL_RSA_VERIFY_INLINE) signed char c; #endif /* only copy output if not inline */ if (outPtr == NULL) { -#if !defined(WOLFSSL_RSA_VERIFY_ONLY) +#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(WOLFSSL_RSA_VERIFY_INLINE) word32 i, j; int start = (int)((size_t)pad - (size_t)key->data);