Skip to content

Commit

Permalink
Merge pull request #6556 from StMartin81/Fix_compilation_of_wc_RsaFun…
Browse files Browse the repository at this point in the history
…ctionNonBlock_if_WOLFSSL_RSA_PUBLIC_ONLY_is_defined

Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY …
  • Loading branch information
dgarske authored Jul 3, 2023
2 parents 732ef09 + 81484ef commit 678a658
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 678a658

Please sign in to comment.