add fips enable switch

This commit is contained in:
toddouska 2014-03-19 09:43:57 -07:00
parent 90b08761c4
commit 8bbc30f3e1
4 changed files with 21 additions and 0 deletions

1
.gitignore vendored
View File

@ -30,6 +30,7 @@ tags
.tags*
cyassl-config
cyassl.sublime*
fips.c
ctaocrypt/benchmark/benchmark
ctaocrypt/test/testctaocrypt
examples/client/client

View File

@ -1058,6 +1058,21 @@ fi
AM_CONDITIONAL([BUILD_RABBIT], [test "x$ENABLED_RABBIT" = "xyes"])
# FIPS
AC_ARG_ENABLE([fips],
[ --enable-fips Enable FIPS 140-2(default: disabled)],
[ ENABLED_FIPS=$enableval ],
[ ENABLED_FIPS=no ]
)
if test "x$ENABLED_FIPS" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS"
fi
AM_CONDITIONAL([BUILD_FIPS], [test "x$ENABLED_FIPS" = "xyes"])
# Filesystem Build
AC_ARG_ENABLE([filesystem],
[ --enable-filesystem Enable Filesystem support (default: enabled)],

1
ctaocrypt/src/fips.c Normal file
View File

@ -0,0 +1 @@
/* dummy fips.c for distribution */

View File

@ -36,6 +36,10 @@ if BUILD_ASN
src_libcyassl_la_SOURCES += ctaocrypt/src/asn.c
endif
if BUILD_FIPS
src_libcyassl_la_SOURCES += ctaocrypt/src/fips.c
endif
if BUILD_CODING
src_libcyassl_la_SOURCES += ctaocrypt/src/coding.c
endif