mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #6297 from JacobBarthelmeh/math
clean up NO_BIG_INT build, removing WOLFSSL_SP_MATH macro and heapmath compile
This commit is contained in:
17
configure.ac
17
configure.ac
@ -536,6 +536,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# MATH LIBRARY SELECTION
|
# MATH LIBRARY SELECTION
|
||||||
|
|
||||||
# Single Precision maths implementation
|
# Single Precision maths implementation
|
||||||
AC_ARG_ENABLE([sp],
|
AC_ARG_ENABLE([sp],
|
||||||
[AS_HELP_STRING([--enable-sp],[Enable Single Precision maths implementation (default: disabled)])],
|
[AS_HELP_STRING([--enable-sp],[Enable Single Precision maths implementation (default: disabled)])],
|
||||||
@ -671,7 +672,7 @@ AC_ARG_ENABLE([heapmath],
|
|||||||
[ ENABLED_HEAPMATH=$enableval ],
|
[ ENABLED_HEAPMATH=$enableval ],
|
||||||
[ ENABLED_HEAPMATH=no]
|
[ ENABLED_HEAPMATH=no]
|
||||||
)
|
)
|
||||||
if test "x$ENABLED_HEAPMATH" = "xyes" || (test "x$ENABLED_SP_MATH_ALL" = "xno" && test "x$ENABLED_FASTMATH" = "xno" && test "x$ENABLED_SP_MATH" = "xno")
|
if test "x$ENABLED_HEAPMATH" = "xyes"
|
||||||
then
|
then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DUSE_INTEGER_HEAP_MATH"
|
AM_CFLAGS="$AM_CFLAGS -DUSE_INTEGER_HEAP_MATH"
|
||||||
ENABLED_HEAPMATH="yes"
|
ENABLED_HEAPMATH="yes"
|
||||||
@ -3959,11 +3960,6 @@ if test "$ENABLED_ASN" = "no"
|
|||||||
then
|
then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_ASN_CRYPT"
|
AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_ASN_CRYPT"
|
||||||
enable_pwdbased=no
|
enable_pwdbased=no
|
||||||
if test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no"
|
|
||||||
then
|
|
||||||
# DH and ECC need bigint
|
|
||||||
AM_CFLAGS="$AM_CFLAGS -DNO_BIG_INT"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
if test "$ENABLED_ASN" = "template"; then
|
if test "$ENABLED_ASN" = "template"; then
|
||||||
ENABLED_ASN="yes"
|
ENABLED_ASN="yes"
|
||||||
@ -4006,10 +4002,11 @@ then
|
|||||||
AC_MSG_ERROR([please disable ecc if disabling asn.])
|
AC_MSG_ERROR([please disable ecc if disabling asn.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# No Big Int (ASN, DSA, RSA, DH and ECC need bigint)
|
# No Big Int (ASN, DSA, RSA, DH, ECC and compatibility layer need bigint)
|
||||||
if test "$ENABLED_ASN" = "no" && test "$ENABLED_DSA" = "no" && \
|
if test "$ENABLED_ASN" = "no" && test "$ENABLED_DSA" = "no" && \
|
||||||
test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && \
|
test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && \
|
||||||
test "$ENABLED_RSA" = "no"
|
test "$ENABLED_RSA" = "no" && test "$ENABLED_OPENSSLEXTRA" = "no" && \
|
||||||
|
test "$ENABLED_OPENSSLALL" ="yes"
|
||||||
then
|
then
|
||||||
ENABLED_SP_MATH_ALL="no"
|
ENABLED_SP_MATH_ALL="no"
|
||||||
ENABLED_FASTMATH="no"
|
ENABLED_FASTMATH="no"
|
||||||
@ -7927,6 +7924,10 @@ AS_IF([test "x$ENABLED_16BIT" = "xyes" && \
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Update CFLAGS based on options #
|
# Update CFLAGS based on options #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
AS_IF([test "x$ENABLED_SP_MATH_ALL" = "xno" && test "x$ENABLED_FASTMATH" = "xno" &&
|
||||||
|
test "x$ENABLED_HEAPMATH" = "xno"],
|
||||||
|
[AM_CFLAGS="$AM_CFLAGS -DNO_BIG_INT"])
|
||||||
|
|
||||||
AS_IF([test "x$ENABLED_CERTS" = "xno"],
|
AS_IF([test "x$ENABLED_CERTS" = "xno"],
|
||||||
[AM_CFLAGS="$AM_CFLAGS -DNO_CERTS"])
|
[AM_CFLAGS="$AM_CFLAGS -DNO_CERTS"])
|
||||||
|
|
||||||
|
@ -53065,6 +53065,7 @@ static int test_tls13_apis(void)
|
|||||||
wolfSSL_CTX_use_PrivateKey_file(serverCtx, ourKey, WOLFSSL_FILETYPE_PEM);
|
wolfSSL_CTX_use_PrivateKey_file(serverCtx, ourKey, WOLFSSL_FILETYPE_PEM);
|
||||||
#endif
|
#endif
|
||||||
serverSsl = wolfSSL_new(serverCtx);
|
serverSsl = wolfSSL_new(serverCtx);
|
||||||
|
AssertNotNull(serverSsl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFSSL_SEND_HRR_COOKIE
|
#ifdef WOLFSSL_SEND_HRR_COOKIE
|
||||||
|
@ -2037,6 +2037,9 @@ extern void uITRON4_free(void *p) ;
|
|||||||
* Constant time: Not supported
|
* Constant time: Not supported
|
||||||
* Enable: USE_INTEGER_HEAP_MATH
|
* Enable: USE_INTEGER_HEAP_MATH
|
||||||
*/
|
*/
|
||||||
|
#elif defined(NO_BIG_INT)
|
||||||
|
/* 5) No big integer math libraries
|
||||||
|
*/
|
||||||
#else
|
#else
|
||||||
/* default is SP Math. */
|
/* default is SP Math. */
|
||||||
#define WOLFSSL_SP_MATH_ALL
|
#define WOLFSSL_SP_MATH_ALL
|
||||||
@ -2140,8 +2143,9 @@ extern void uITRON4_free(void *p) ;
|
|||||||
#undef HAVE_ECC_KEY_IMPORT
|
#undef HAVE_ECC_KEY_IMPORT
|
||||||
#define HAVE_ECC_KEY_IMPORT
|
#define HAVE_ECC_KEY_IMPORT
|
||||||
#endif
|
#endif
|
||||||
/* The ECC key export requires mp_int */
|
/* The ECC key export requires mp_int or SP */
|
||||||
#if !defined(NO_ECC_KEY_EXPORT) && !defined(NO_BIG_INT)
|
#if (!defined(NO_ECC_KEY_EXPORT) && defined(WOLFSSL_SP_MATH)) || \
|
||||||
|
(!defined(NO_ECC_KEY_EXPORT) && !defined(NO_BIG_INT))
|
||||||
#undef HAVE_ECC_KEY_EXPORT
|
#undef HAVE_ECC_KEY_EXPORT
|
||||||
#define HAVE_ECC_KEY_EXPORT
|
#define HAVE_ECC_KEY_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user