Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY is defined

This commit is contained in:
Martin Stolpe 2023-06-28 15:29:03 +02:00 committed by David Garske
parent 95675c7e34
commit 81484ef74b

View File

@ -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,