diff --git a/autogen.sh b/autogen.sh index e658a241b0a..aba57d7152f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -12,38 +12,43 @@ if test -d .git; then ln -s -f ../../pre-push.sh .git/hooks/pre-push fi +# touch options.h (make sure it exists) +touch ./wolfssl/options.h + +# touch fips files for non fips distribution +touch ./ctaocrypt/src/fips.c +touch ./ctaocrypt/src/fips_test.c +touch ./wolfcrypt/src/fips.c +touch ./wolfcrypt/src/fips_test.c +touch ./wolfcrypt/src/wolfcrypt_first.c +touch ./wolfcrypt/src/wolfcrypt_last.c +touch ./wolfssl/wolfcrypt/fips.h + +# touch CAVP selftest files for non-selftest distribution +touch ./wolfcrypt/src/selftest.c + +# touch async crypt files +touch ./wolfcrypt/src/async.c +touch ./wolfssl/wolfcrypt/async.h + +# touch async port files +touch ./wolfcrypt/src/port/intel/quickassist.c +touch ./wolfcrypt/src/port/intel/quickassist_mem.c +touch ./wolfcrypt/src/port/cavium/cavium_nitrox.c +if [ ! -d ./wolfssl/wolfcrypt/port/intel ]; then + mkdir ./wolfssl/wolfcrypt/port/intel +fi +touch ./wolfssl/wolfcrypt/port/intel/quickassist.h +touch ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h +if [ ! -d ./wolfssl/wolfcrypt/port/cavium ]; then + mkdir ./wolfssl/wolfcrypt/port/cavium +fi +touch ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h + # If this is a source checkout then call autoreconf with error as well if test -e .git; then WARNINGS="all,error" - # touch fips files for non fips distribution - touch ./ctaocrypt/src/fips.c - touch ./ctaocrypt/src/fips_test.c - touch ./wolfcrypt/src/fips.c - touch ./wolfcrypt/src/fips_test.c - touch ./wolfcrypt/src/wolfcrypt_first.c - touch ./wolfcrypt/src/wolfcrypt_last.c - touch ./wolfssl/wolfcrypt/fips.h - - # touch CAVP selftest files for non-selftest distribution - touch ./wolfcrypt/src/selftest.c - - # touch async crypt files - touch ./wolfcrypt/src/async.c - touch ./wolfssl/wolfcrypt/async.h - - # touch async port files - touch ./wolfcrypt/src/port/intel/quickassist.c - touch ./wolfcrypt/src/port/intel/quickassist_mem.c - touch ./wolfcrypt/src/port/cavium/cavium_nitrox.c - if [ ! -d ./wolfssl/wolfcrypt/port/intel ]; then - mkdir ./wolfssl/wolfcrypt/port/intel - fi - touch ./wolfssl/wolfcrypt/port/intel/quickassist.h - touch ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h - if [ ! -d ./wolfssl/wolfcrypt/port/cavium ]; then - mkdir ./wolfssl/wolfcrypt/port/cavium - fi - touch ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h + else WARNINGS="all" fi diff --git a/configure.ac b/configure.ac index 8040eeb1954..f8b7ae90d64 100644 --- a/configure.ac +++ b/configure.ac @@ -4456,6 +4456,14 @@ then fi +# User Settings +AC_ARG_ENABLE([usersettings], + [AS_HELP_STRING([--enable-usersettings],[Use your own user_settings.h and do not add Makefile CFLAGS (default: disabled)])], + [ ENABLED_USERSETTINGS=$enableval ], + [ ENABLED_USERSETTINGS=no ] + ) + + # Default optimization CFLAGS enable AC_ARG_ENABLE([optflags], [AS_HELP_STRING([--enable-optflags],[Enable default optimization CFLAGS for the compiler (default: enabled)])], @@ -4679,6 +4687,13 @@ AS_IF([test "x$ENABLED_WOLFSSH" = "xyes"], ################################################################################ +# USER SETTINGS +if test "x$ENABLED_USERSETTINGS" = "xyes" +then + # Replace all options and just use WOLFSSL_USER_SETTINGS + AM_CFLAGS="-DWOLFSSL_USER_SETTINGS" +fi + # OPTIMIZE FLAGS # For distro disable custom build options that interfere with symbol generation if test "$GCC" = "yes" && test "$ENABLED_DISTRO" = "no" @@ -4710,7 +4725,7 @@ fi # Expose HAVE___UINT128_T to options flags" if test "$ac_cv_type___uint128_t" = "yes" then - AM_CFLAGS="$AM_CFLAGS -DHAVE___UINT128_T" + AM_CFLAGS="$AM_CFLAGS -DHAVE___UINT128_T=1" fi diff --git a/tests/api.c b/tests/api.c index aeb060aa15c..c29edfda5f3 100644 --- a/tests/api.c +++ b/tests/api.c @@ -11625,7 +11625,7 @@ static int test_wc_RsaPublicEncryptDecrypt (void) /* Decrypt */ printf(testingFmt, "wc_RsaPrivateDecrypt()"); - #if defined(WC_RSA_BLINDING) + #if defined(WC_RSA_BLINDING) && !defined(HAVE_FIPS) /* Bind rng */ if (ret == 0) { ret = wc_RsaSetRNG(&key, &rng); @@ -11713,7 +11713,7 @@ static int test_wc_RsaPublicEncryptDecrypt_ex (void) /* Decrypt */ printf(testingFmt, "wc_RsaPrivateDecrypt_ex()"); - #if defined(WC_RSA_BLINDING) + #if defined(WC_RSA_BLINDING) && !defined(HAVE_FIPS) if (ret == 0) { ret = wc_RsaSetRNG(&key, &rng); }