diff options
author | Juergen Repp <Juergen.Repp@sit.fraunhofer.de> | 2018-07-17 13:36:38 +0200 |
---|---|---|
committer | Tadeusz Struk <tadeusz.struk@intel.com> | 2018-07-30 14:47:54 -0700 |
commit | ac598361c01d63fda605146586795b22aed846ce (patch) | |
tree | 2ea42ababa8f043bb7477ee633d9ab900019190e /configure.ac | |
parent | 91e7bd65b6ef6a945da76e27bd09d8cfeeb1cbc5 (diff) | |
download | tpm2-tss-ac598361c01d63fda605146586795b22aed846ce.tar.gz |
TEST ESYS: Enable tests for physical TPM.
* To enable tests with a physical TPM the configure options:
--with-ptpm=[device]
--with-ptpmtests=[test cases]
were added. To compile the integration tests --enable-integration has
to be used. The test cases are a comma separated list of:
mandatory, optional and destructive. The default is mandatory.
To avoid parallel usage of the TPM the tests should be executed with:
make check-ptpm
or with:
make check -j 1.
The compiled integration tests for a simulator test can be used for
tests with a physical TPM without re-compilation.
* A second int_log compiler script was added to execute these tests.
* Split policy regression tests into two parts. Optional commands are
moved to the test policy-regression-opt.
* The test policy-ticket will return success if the PolicyTicket command
is not available, but all other commands in this tests were
successful.
* Exponent 0 will be used in the ESAPI integration tests.
Exponent 65537 for RSA keys is optional in TPM spec while exponent
is mandatory:
A TPM compatible with this specification and supporting RSA shall
support two primes and an exponent of zero. Support for other values
is optional. (Spec Part2 12.2.3.5 TPMS_RSA_PARMS).
* The check whether optional commands are available are adapted for the
usage with a resource manager TPM.
Signed-off-by: Juergen Repp <Juergen.Repp@sit.fraunhofer.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3b1994c3..34f6f91c 100644 --- a/configure.ac +++ b/configure.ac @@ -237,6 +237,44 @@ AC_SUBST([PATH]) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 AX_ADD_COMPILER_FLAG([-Wno-missing-braces]) +dnl --------- Physical TPM device ----------------------- + +AC_ARG_WITH([ptpm], + [AS_HELP_STRING([--with-ptpm=<device>,[TPM device]])], + [AS_IF([test \( -w "$with_ptpm" \) -a \( -r "$with_ptpm" \)], + [AC_MSG_RESULT([success]) + AC_SUBST([PTPM],[$with_ptpm]) + AX_NORMALIZE_PATH([with_ptpm]) + with_ptpm_set=yes], + [AC_MSG_ERROR([TPM device provided does not exist or is not writable])])], + [with_ptpm_set=no]) +AM_CONDITIONAL([PTPM],[test "x$with_ptpm_set" = "xyes"]) + +AC_ARG_WITH([ptpmtests], + [AS_HELP_STRING([--with-ptpmtests=<case>],[Comma-separated values of possible tests: destructive,mandatory,optional] default is mandatory)], + [AS_IF([test "x" == x$(echo $with_ptpmtests | sed 's/destructive//g' | sed 's/mandatory//g' | sed 's/optional//g' | sed 's/,//g') ], + [AC_MSG_RESULT([success]) + with_ptpmtests_set=yes], + [AC_MSG_ERROR([Illegal test type for pTPM tests.])])], + [with_ptpmtests="mandatory"]) + +if echo $with_ptpmtests | grep destructive > /dev/null; then + enable_ptpm_destructive="yes" +fi +AM_CONDITIONAL([PTPMDESTRUCTIVE],[test "x$enable_ptpm_destructive" = "xyes"]) + +if echo $with_ptpmtests | grep optional > /dev/null; then + enable_ptpm_optional="yes" +fi +AM_CONDITIONAL([PTPMOPTIONAL],[test "x$enable_ptpm_optional" = "xyes"]) + +if echo $with_ptpmtests | grep mandatory > /dev/null; then + enable_ptpm_mandatory="yes" +fi +AM_CONDITIONAL([PTPMMANDATORY],[test "x$enable_ptpm_mandatory" = "xyes"]) + +AM_CONDITIONAL([TESTPTPM],[test "x$with_ptpm_set" = "xyes" -a "x$with_ptpm_set" = "xyes"]) + dnl --------- Doxy Gen ----------------------- DX_DOXYGEN_FEATURE(ON) DX_DOT_FEATURE(OFF) |