for lean-psk build: remove big int math, MD4, error strings

This commit is contained in:
John Safranek 2012-11-02 16:49:31 -07:00
parent 917bc83c60
commit b8c9247769
5 changed files with 21 additions and 9 deletions

View File

@ -206,6 +206,7 @@ then
AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT"
fi
ENABLED_SLOWMATH="yes"
# lean psk build
AC_ARG_ENABLE(leanpsk,
@ -216,7 +217,8 @@ AC_ARG_ENABLE(leanpsk,
if test "$ENABLED_LEANPSK" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DNO_AES -DNO_FILESYSTEM -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS"
AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DNO_AES -DNO_FILESYSTEM -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_ERROR_STRINGS"
ENABLED_SLOWMATH="no"
fi
AM_CONDITIONAL([BUILD_LEANPSK], [test "x$ENABLED_LEANPSK" = "xyes"])
@ -232,6 +234,7 @@ AC_ARG_ENABLE(fastmath,
if test "x$ENABLED_FASTMATH" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
ENABLED_SLOWMATH="no"
fi
@ -251,10 +254,11 @@ if test "$ENABLED_FASTHUGEMATH" = "yes"
then
ENABLED_FASTMATH="yes"
AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
ENABLED_SLOWMATH="no"
fi
AM_CONDITIONAL([BUILD_FASTMATH], [test "x$ENABLED_FASTMATH" = "xyes"])
AM_CONDITIONAL([BUILD_SLOWMATH], [test "x$ENABLED_SLOWMATH" = "xyes"])
# big cache
AC_ARG_ENABLE(bigcache,

View File

@ -37,6 +37,7 @@ void CTaoCryptErrorString(int error, char* buffer)
#ifdef NO_ERROR_STRINGS
(void)error;
XSTRNCPY(buffer, "no support for error strings built in", max);
#else

View File

@ -150,18 +150,22 @@ void ctaocrypt_test(void* args)
((func_args*)args)->return_code = -1; /* error state */
#if !defined(CYASSL_LEANPSK)
if (CheckCtcSettings() != 1)
err_sys("Build vs runtime math mismatch\n", -1234);
#ifdef USE_FAST_MATH
if (CheckFastMathSettings() != 1)
err_sys("Build vs runtime fastmath FP_MAX_BITS mismatch\n", -1235);
#endif
#endif /* USE_FAST_MATH */
#endif /* !CYASSL_LEANPSK */
#ifdef NO_MD5
if ( (ret = md5_test()) )
err_sys("MD5 test failed!\n", ret);
else
printf( "MD5 test passed!\n");
#endif
#ifdef CYASSL_MD2
if ( (ret = md2_test()) )

View File

@ -10,15 +10,12 @@ src_libcyassl_la_SOURCES = \
src/ssl.c \
src/tls.c \
ctaocrypt/src/coding.c \
ctaocrypt/src/des3.c \
ctaocrypt/src/hmac.c \
ctaocrypt/src/md5.c \
ctaocrypt/src/md4.c \
ctaocrypt/src/hmac.c \
ctaocrypt/src/random.c \
ctaocrypt/src/sha.c \
ctaocrypt/src/sha256.c \
ctaocrypt/src/arc4.c \
ctaocrypt/src/pwdbased.c \
ctaocrypt/src/logging.c \
ctaocrypt/src/error.c \
ctaocrypt/src/memory.c
@ -29,9 +26,12 @@ src_libcyassl_la_CPPFLAGS = -DBUILDING_CYASSL $(AM_CPPFLAGS)
if !BUILD_LEANPSK
src_libcyassl_la_SOURCES += ctaocrypt/src/rsa.c \
ctaocrypt/src/des3.c \
ctaocrypt/src/md4.c \
ctaocrypt/src/asn.c \
ctaocrypt/src/dh.c \
ctaocrypt/src/dsa.c \
ctaocrypt/src/pwdbased.c \
ctaocrypt/src/aes.c
endif
@ -69,7 +69,9 @@ endif
if BUILD_FASTMATH
src_libcyassl_la_SOURCES += ctaocrypt/src/tfm.c
else
endif
if BUILD_SLOWMATH
src_libcyassl_la_SOURCES += ctaocrypt/src/integer.c
endif

View File

@ -4176,6 +4176,7 @@ void SetErrorString(int error, char* str)
#ifdef NO_ERROR_STRINGS
(void)error;
XSTRNCPY(str, "no support for error strings built in", max);
#else