diff options
author | John Andersen <john.s.andersen@intel.com> | 2019-01-16 12:58:36 -0800 |
---|---|---|
committer | Tadeusz Struk <tadeusz.struk@intel.com> | 2019-02-27 10:12:03 -0800 |
commit | 443455b885c5e51aaeab691ebba31090a8809d68 (patch) | |
tree | 1c958729ab80c203921d80ffccfea8c1732919fd /configure.ac | |
parent | 3a493816c210f005ffbc6cfb26a7617a3e5b081c (diff) | |
download | tpm2-tss-443455b885c5e51aaeab691ebba31090a8809d68.tar.gz |
test: fuzz: Added fuzzing TCTI
* Created a test/fuzz/tcti/ directory which contains a TCTI to be used
for fuzz testing.
* Added ifdefs to sapi helpers and test-options in integration tests to
enable static linking to a single TCTI.
* Added configure.ac options to build fuzzing TCTI.
* Added Makefile-fuzz.am used to build fuzzing TCTI.
Signed-off-by: John Andersen <john.s.andersen@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d9695318..51b11eee 100644 --- a/configure.ac +++ b/configure.ac @@ -138,6 +138,8 @@ AC_ARG_ENABLE([tcti-device], [enable_tcti_device=$enableval], [enable_tcti_device=yes]) AM_CONDITIONAL([ENABLE_TCTI_DEVICE], [test "x$enable_tcti_device" != xno]) +AS_IF([test "x$enable_tcti_device" = "xyes"], + AC_DEFINE([TCTI_DEVICE],[1], [TCTI FOR DEV TPM])) AC_ARG_ENABLE([tcti-mssim], [AS_HELP_STRING([--enable-tcti-mssim], @@ -148,6 +150,15 @@ AM_CONDITIONAL([ENABLE_TCTI_MSSIM], [test "x$enable_tcti_mssim" != xno]) AS_IF([test "x$enable_tcti_mssim" = "xyes"], AC_DEFINE([TCTI_MSSIM],[1], [TCTI FOR MS SIMULATOR])) +AC_ARG_ENABLE([tcti-fuzzing], + [AS_HELP_STRING([--enable-tcti-fuzzing], + [build the tcti-fuzzing module (default is no)])], + [enable_tcti_fuzzing=$enableval], + [enable_tcti_fuzzing=no]) +AM_CONDITIONAL([ENABLE_TCTI_FUZZING], [test "x$enable_tcti_fuzzing" != xno]) +AS_IF([test "x$enable_tcti_fuzzing" = "xyes"], + AC_DEFINE([TCTI_FUZZING],[1], [TCTI FOR FUZZING])) + # # udev # @@ -327,7 +338,15 @@ AC_OUTPUT AM_COND_IF([ENABLE_TCTI_DEVICE], [], [AM_COND_IF([ENABLE_TCTI_MSSIM], [], - [AC_MSG_WARN("No build-in TCTI module enabled")])]) + [AM_COND_IF([ENABLE_TCTI_FUZZING], [], + [AC_MSG_WARN("No build-in TCTI module enabled")])])]) + +AM_COND_IF([ENABLE_TCTI_FUZZING], [ + AM_COND_IF([ENABLE_TCTI_DEVICE], + AC_MSG_ERROR("Fuzzing TCTI is meant to be built as the only TCTI"), []) + AM_COND_IF([ENABLE_TCTI_MSSIM], + AC_MSG_ERROR("Fuzzing TCTI is meant to be built as the only TCTI"), []) + ], []) AC_MSG_RESULT([ $PACKAGE_NAME $VERSION |