mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
tpm2d: add tests for the tpm2daemon
* configure.ac: Detect TPM emulator and enable tests. * tests/tpm2dtests/: New test suite. * tests/Makefile.am: Run tests. -- Add a set of tests that exercise tpm2daemon handling of keys and verify compatibility with non-tpm based keys. Running this test infrastructure requires a tpm emulator, which is tested for during configuration. If an emulator is not found, the tests won't be run since they require the presence of a TPM (although the TPM handling code will still be built). Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> - Fixed tests/Makefile.am for make distcheck. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
92b601fcee
commit
6720f1343a
12 changed files with 895 additions and 1 deletions
13
configure.ac
13
configure.ac
|
@ -1609,12 +1609,17 @@ if test "$have_libtss" = yes; then
|
|||
LIBTSS_LIBS=$LIBS
|
||||
AC_DEFINE(HAVE_LIBTSS, 1, [Defined if we have TPM2 support library])
|
||||
AC_SUBST(TSS_INCLUDE)
|
||||
# look for a TPM emulator for testing
|
||||
AC_PATH_PROG(TPMSERVER, tpm_server,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
||||
AC_PATH_PROG(SWTPM, swtpm,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
||||
AC_PATH_PROG(SWTPM_IOCTL, swtpm_ioctl,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)
|
||||
fi
|
||||
LIBS="$_save_libs"
|
||||
CFLAGS="$_save_cflags"
|
||||
AC_SUBST(LIBTSS_LIBS)
|
||||
AC_SUBST(LIBTSS_CFLAGS)
|
||||
AM_CONDITIONAL(HAVE_LIBTSS, test "$have_libtss" = yes)
|
||||
AM_CONDITIONAL(TEST_LIBTSS, test -n "$TPMSERVER" -o -n "$SWTPM")
|
||||
AC_SUBST(HAVE_LIBTSS)
|
||||
|
||||
#
|
||||
|
@ -2091,6 +2096,7 @@ doc/Makefile
|
|||
tests/Makefile
|
||||
tests/gpgscm/Makefile
|
||||
tests/openpgp/Makefile
|
||||
tests/tpm2dtests/Makefile
|
||||
tests/migrations/Makefile
|
||||
tests/gpgsm/Makefile
|
||||
tests/gpgme/Makefile
|
||||
|
@ -2141,6 +2147,13 @@ echo "
|
|||
Tor support: $show_tor_support
|
||||
TPM support: $have_libtss
|
||||
"
|
||||
if test "$have_libtss" != no -a -z "$TPMSERVER" -a -z "$SWTPM"; then
|
||||
cat <<G10EOF
|
||||
Warning: TPM support is compiled in but no software TPM
|
||||
for testing was discovered. TPM tests are disabled
|
||||
|
||||
G10EOF
|
||||
fi
|
||||
if test "x${gpg_config_script_warn}" != x; then
|
||||
cat <<G10EOF
|
||||
Warning: Mismatches between the target platform and the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue