mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY is defined
This commit is contained in:
committed by
David Garske
parent
95675c7e34
commit
81484ef74b
@@ -2123,6 +2123,7 @@ static int wc_RsaFunctionNonBlock(const byte* in, word32 inLen, byte* out,
|
|||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
switch(type) {
|
switch(type) {
|
||||||
|
#if !defined(WOLFSSL_RSA_PUBLIC_ONLY)
|
||||||
case RSA_PRIVATE_DECRYPT:
|
case RSA_PRIVATE_DECRYPT:
|
||||||
case RSA_PRIVATE_ENCRYPT:
|
case RSA_PRIVATE_ENCRYPT:
|
||||||
ret = fp_exptmod_nb(&key->nb->exptmod, &key->nb->tmp, &key->d,
|
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)
|
if (ret != MP_OKAY)
|
||||||
ret = MP_EXPTMOD_E;
|
ret = MP_EXPTMOD_E;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case RSA_PUBLIC_ENCRYPT:
|
case RSA_PUBLIC_ENCRYPT:
|
||||||
case RSA_PUBLIC_DECRYPT:
|
case RSA_PUBLIC_DECRYPT:
|
||||||
ret = fp_exptmod_nb(&key->nb->exptmod, &key->nb->tmp, &key->e,
|
ret = fp_exptmod_nb(&key->nb->exptmod, &key->nb->tmp, &key->e,
|
||||||
|
Reference in New Issue
Block a user