mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Fix for unit.test
error with RSA 1024-bit key gen when using ./configure --enable-keygen --enable-sp
. Issue started in PR #3119
This commit is contained in:
@ -651,10 +651,16 @@ int wc_CheckRsaKey(RsaKey* key)
|
|||||||
break;
|
break;
|
||||||
#endif /* WOLFSSL_SP_4096 */
|
#endif /* WOLFSSL_SP_4096 */
|
||||||
default:
|
default:
|
||||||
|
/* If using only single prcsision math then issue key size error,
|
||||||
|
otherwise fall-back to multi-precision math calculation */
|
||||||
|
#ifdef WOLFSSL_SP_MATH
|
||||||
ret = WC_KEY_SIZE_E;
|
ret = WC_KEY_SIZE_E;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_HAVE_SP_RSA */
|
#endif /* WOLFSSL_HAVE_SP_RSA */
|
||||||
|
|
||||||
#ifndef WOLFSSL_SP_MATH
|
#ifndef WOLFSSL_SP_MATH
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
if (mp_exptmod(k, &key->e, &key->n, tmp) != MP_OKAY)
|
if (mp_exptmod(k, &key->e, &key->n, tmp) != MP_OKAY)
|
||||||
@ -764,8 +770,8 @@ int wc_CheckRsaKey(RsaKey* key)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* WOLFSSL_KEY_GEN && !WOLFSSL_NO_RSA_KEY_CHECK */
|
||||||
#endif
|
#endif /* WOLFSSL_RSA_PUBLIC_ONLY */
|
||||||
|
|
||||||
|
|
||||||
#if !defined(WC_NO_RSA_OAEP) || defined(WC_RSA_PSS)
|
#if !defined(WC_NO_RSA_OAEP) || defined(WC_RSA_PSS)
|
||||||
|
Reference in New Issue
Block a user