diff --git a/.gitignore b/.gitignore index 44ff8d102..4b3571f6a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ tags .tags* cyassl-config cyassl.sublime* +fips.c ctaocrypt/benchmark/benchmark ctaocrypt/test/testctaocrypt examples/client/client diff --git a/configure.ac b/configure.ac index 46e52421e..f0ec16cea 100644 --- a/configure.ac +++ b/configure.ac @@ -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)], diff --git a/ctaocrypt/src/fips.c b/ctaocrypt/src/fips.c new file mode 100644 index 000000000..8c8c223e2 --- /dev/null +++ b/ctaocrypt/src/fips.c @@ -0,0 +1 @@ +/* dummy fips.c for distribution */ diff --git a/src/include.am b/src/include.am index e57f0f6fc..ce201cf2a 100644 --- a/src/include.am +++ b/src/include.am @@ -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