Skip to content

Commit

Permalink
Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY …
Browse files Browse the repository at this point in the history
…is defined
  • Loading branch information
Martin Stolpe authored and dgarske committed Jun 30, 2023
1 parent 95675c7 commit 81484ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wolfcrypt/src/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 81484ef

Please sign in to comment.