From 81484ef74b6f8fda695bb0df0e62c1267a50b739 Mon Sep 17 00:00:00 2001 From: Martin Stolpe Date: Wed, 28 Jun 2023 15:29:03 +0200 Subject: [PATCH] Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY is defined --- wolfcrypt/src/rsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 03c624fc3..39c68cbb3 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -2123,6 +2123,7 @@ static int wc_RsaFunctionNonBlock(const byte* in, word32 inLen, byte* out, if (ret == 0) { switch(type) { +#if !defined(WOLFSSL_RSA_PUBLIC_ONLY) case RSA_PRIVATE_DECRYPT: case RSA_PRIVATE_ENCRYPT: ret = fp_exptmod_nb(&key->nb->exptmod, &key->nb->tmp, &key->d, @@ -2132,7 +2133,7 @@ static int wc_RsaFunctionNonBlock(const byte* in, word32 inLen, byte* out, if (ret != MP_OKAY) ret = MP_EXPTMOD_E; break; - +#endif case RSA_PUBLIC_ENCRYPT: case RSA_PUBLIC_DECRYPT: ret = fp_exptmod_nb(&key->nb->exptmod, &key->nb->tmp, &key->e,