Updated the configure.ac comments about big int being used for ECC and DH. Moved the checks for ecc/asn and psk/asn until after cryptonly value is set and fixed so those checks work for normal build and are excluded for crypt only builds.

This commit is contained in:
David Garske 2016-02-10 13:03:53 -08:00
parent 8d0d5a3f90
commit a83ff6aada
2 changed files with 18 additions and 17 deletions

View File

@ -1034,7 +1034,7 @@ then
AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS"
if test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" == "no"
then
# DH needs bigint
# DH and ECC need bigint
AM_CFLAGS="$AM_CFLAGS -DNO_BIG_INT"
fi
else
@ -1056,20 +1056,7 @@ then
AC_MSG_ERROR([please disable dsa if disabling asn.])
fi
if test "x$ENABLED_CRYPTONLY" = "xyes"
then
if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no"
then
AC_MSG_ERROR([please disable ecc if disabling asn.])
fi
if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no"
then
AC_MSG_ERROR([please enable psk if disabling asn.])
fi
fi
# DH needs bigint
# DH and ECC need bigint
if test "$ENABLED_ASN" = "no" && test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no"
then
ENABLED_FASTMATH=no
@ -2164,6 +2151,19 @@ fi
AM_CONDITIONAL([BUILD_CRYPTONLY], [test "x$ENABLED_CRYPTONLY" = "xyes"])
if test "x$ENABLED_CRYPTONLY" = "xno"
then
if test "x$ENABLED_PSK" = "xno" && test "x$ENABLED_ASN" = "xno"
then
AC_MSG_ERROR([please enable psk if disabling asn.])
fi
if test "x$ENABLED_ECC" = "xyes" && test "x$ENABLED_ASN" = "xno"
then
AC_MSG_ERROR([please disable ecc if disabling asn.])
fi
fi
# set fastmath default
FASTMATH_DEFAULT=no
@ -2182,7 +2182,7 @@ AC_ARG_ENABLE([fastmath],
if test "x$ENABLED_FASTMATH" = "xyes"
then
# turn off fastmth if leanpsk on or asn off (w/o dh)
# turn off fastmth if leanpsk on or asn off (w/o DH and ECC)
if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no"
then
if test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no"

View File

@ -6172,7 +6172,8 @@ int ecc_test(void)
WC_RNG rng;
byte sharedA[1024];
byte sharedB[1024];
#ifndef NO_ASN
#if !defined(NO_ASN) || (!defined(NO_SHA) && \
((defined(HAVE_ECC192) && defined(HAVE_ECC224)) || defined(HAVE_ALL_CURVES)))
byte sig[1024];
int verify;
#endif