mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
add early return to normal math and WOLFSSL_VALIDATE_ECC_IMPORT to enable-all and enable-fpecc builds
This commit is contained in:
@@ -199,6 +199,9 @@ then
|
|||||||
|
|
||||||
# Enable multiple attribute additions such as DC
|
# Enable multiple attribute additions such as DC
|
||||||
AM_CFLAGS="-DWOLFSSL_MULTI_ATTRIB $AM_CFLAGS"
|
AM_CFLAGS="-DWOLFSSL_MULTI_ATTRIB $AM_CFLAGS"
|
||||||
|
|
||||||
|
# Enable checks on ECC keys that are imported
|
||||||
|
AM_CFLAGS="-DWOLFSSL_VALIDATE_ECC_IMPORT $AM_CFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -1626,6 +1629,9 @@ then
|
|||||||
AC_MSG_ERROR([cannot enable fpecc without enabling ecc.])
|
AC_MSG_ERROR([cannot enable fpecc without enabling ecc.])
|
||||||
fi
|
fi
|
||||||
AM_CFLAGS="$AM_CFLAGS -DFP_ECC"
|
AM_CFLAGS="$AM_CFLAGS -DFP_ECC"
|
||||||
|
|
||||||
|
# Enable checks on ECC keys that are imported
|
||||||
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_VALIDATE_ECC_IMPORT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@@ -965,7 +965,7 @@ int mp_invmod (mp_int * a, mp_int * b, mp_int * c)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* b cannot be negative */
|
/* b cannot be negative */
|
||||||
if (b->sign == MP_NEG || mp_iszero(b) == MP_YES) {
|
if (b->sign == MP_NEG || mp_iszero(b) == MP_YES || mp_iszero(a) == MP_YES) {
|
||||||
return MP_VAL;
|
return MP_VAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user