RNG : change to --disable-rng, non-autoconf scenario, help msg

This commit is contained in:
Jacob Barthelmeh
2016-11-01 10:21:29 -06:00
parent 09c32de412
commit 70e7e34c87
2 changed files with 8 additions and 6 deletions

View File

@@ -221,17 +221,17 @@ then
fi
AC_ARG_ENABLE([norng],
[ --enable-norng Enable Test Cert (default: disabled)],
[ ENABLED_NORNG=$enableval ],
[ ENABLED_NORNG=no ]
AC_ARG_ENABLE([rng],
[AS_HELP_STRING([ --enable-rng Enable compiling and using RNG (default: enabled)])],
[ ENABLED_RNG=$enableval ],
[ ENABLED_RNG=yes ]
)
if test "$ENABLED_NORNG" = "yes"
if test "$ENABLED_RNG" = "no"
then
AM_CFLAGS="$AM_CFLAGS -DWC_NO_RNG"
fi
AM_CONDITIONAL([BUILD_RNG], [test "x$ENABLED_NORNG" = "xno"])
AM_CONDITIONAL([BUILD_RNG], [test "x$ENABLED_RNG" = "xyes"])
# DTLS-SCTP

View File

@@ -82,6 +82,7 @@ int wc_RNG_GenerateByte(WC_RNG* rng, byte* b)
}
#endif /* HAVE_HASHDRBG || NO_RC4 */
#else /* else build without fips */
#ifndef WC_NO_RNG /* if not FIPS and RNG is disabled then do not compile */
#include <wolfssl/wolfcrypt/error-crypt.h>
/* Allow custom RNG system */
@@ -1671,5 +1672,6 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
#endif /* USE_WINDOWS_API */
#endif /* CUSTOM_RAND_GENERATE_BLOCK */
#endif /* WC_NO_RNG */
#endif /* HAVE_FIPS */