Skip to content

Commit 678a658

Browse files
authored
Merge pull request #6556 from StMartin81/Fix_compilation_of_wc_RsaFunctionNonBlock_if_WOLFSSL_RSA_PUBLIC_ONLY_is_defined
Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY …
2 parents 732ef09 + 81484ef commit 678a658

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

wolfcrypt/src/rsa.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,7 @@ static int wc_RsaFunctionNonBlock(const byte* in, word32 inLen, byte* out,
21232123

21242124
if (ret == 0) {
21252125
switch(type) {
2126+
#if !defined(WOLFSSL_RSA_PUBLIC_ONLY)
21262127
case RSA_PRIVATE_DECRYPT:
21272128
case RSA_PRIVATE_ENCRYPT:
21282129
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,
21322133
if (ret != MP_OKAY)
21332134
ret = MP_EXPTMOD_E;
21342135
break;
2135-
2136+
#endif
21362137
case RSA_PUBLIC_ENCRYPT:
21372138
case RSA_PUBLIC_DECRYPT:
21382139
ret = fp_exptmod_nb(&key->nb->exptmod, &key->nb->tmp, &key->e,

0 commit comments

Comments
 (0)