Merge pull request #4185 from guidovranken/fix-gh-issue-4184

Fix compilation failure with WOLFSSL_PUBLIC_ECC_ADD_DBL
This commit is contained in:
JacobBarthelmeh
2021-07-15 16:19:30 +07:00
committed by GitHub
4 changed files with 17 additions and 16 deletions

View File

@ -2490,22 +2490,23 @@ done:
return err;
#else
if (P == NULL || modulus == NULL)
return ECC_BAD_ARG_E;
if (P == NULL || modulus == NULL)
return ECC_BAD_ARG_E;
(void)mp;
(void)mp;
(void)ct;
#ifndef WOLFSSL_SP_NO_256
if (mp_count_bits(modulus) == 256) {
return sp_ecc_map_256(P->x, P->y, P->z);
}
if (mp_count_bits(modulus) == 256) {
return sp_ecc_map_256(P->x, P->y, P->z);
}
#endif
#ifdef WOLFSSL_SP_384
if (mp_count_bits(modulus) == 384) {
return sp_ecc_map_384(P->x, P->y, P->z);
}
if (mp_count_bits(modulus) == 384) {
return sp_ecc_map_384(P->x, P->y, P->z);
}
#endif
return ECC_BAD_ARG_E;
return ECC_BAD_ARG_E;
#endif
}
#endif /* !FREESCALE_LTC_ECC && !WOLFSSL_STM32_PKA */

View File

@ -19116,7 +19116,7 @@ int sp_ecc_proj_add_point_256(mp_int* pX, mp_int* pY, mp_int* pZ,
sp_point_256 p[2];
#endif
sp_point_256* q = NULL;
int err;
int err = MP_OKAY;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
if (err == MP_OKAY) {
@ -26845,7 +26845,7 @@ int sp_ecc_proj_add_point_384(mp_int* pX, mp_int* pY, mp_int* pZ,
sp_point_384 p[2];
#endif
sp_point_384* q = NULL;
int err;
int err = MP_OKAY;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
if (err == MP_OKAY) {

View File

@ -18899,7 +18899,7 @@ int sp_ecc_proj_add_point_256(mp_int* pX, mp_int* pY, mp_int* pZ,
sp_point_256 p[2];
#endif
sp_point_256* q = NULL;
int err;
int err = MP_OKAY;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
if (err == MP_OKAY) {
@ -26099,7 +26099,7 @@ int sp_ecc_proj_add_point_384(mp_int* pX, mp_int* pY, mp_int* pZ,
sp_point_384 p[2];
#endif
sp_point_384* q = NULL;
int err;
int err = MP_OKAY;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
if (err == MP_OKAY) {

View File

@ -22861,7 +22861,7 @@ int sp_ecc_proj_add_point_256(mp_int* pX, mp_int* pY, mp_int* pZ,
sp_point_256 p[2];
#endif
sp_point_256* q = NULL;
int err;
int err = MP_OKAY;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
if (err == MP_OKAY) {
@ -30084,7 +30084,7 @@ int sp_ecc_proj_add_point_384(mp_int* pX, mp_int* pY, mp_int* pZ,
sp_point_384 p[2];
#endif
sp_point_384* q = NULL;
int err;
int err = MP_OKAY;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC)
if (err == MP_OKAY) {