From 5d87c9d5c1c1e424d0dbc786470c764fab7ef706 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Mon, 2 Aug 2021 13:41:29 -0700 Subject: [PATCH] Verify that TPMv2 startup tools are present in order to enable auth-swtpm tests Autoconf source now verifies that either 'tpm2_startup' or 'tsstartup' is found before enabling this test. See discussion at https://gitlab.com/openconnect/openconnect/-/issues/287#note_640185660. I also added tpm2-tools (package providing 'tpm2_startup') to the Fedora build image, in https://gitlab.com/openconnect/build-images/-/commit/35ee4ffb88ba319014c321dc8999e48fce81f130. Signed-off-by: Daniel Lenski --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 562c5c38..fef5217d 100644 --- a/configure.ac +++ b/configure.ac @@ -715,8 +715,12 @@ AM_CONDITIONAL(OPENCONNECT_TSS2_IBM, [ test "$tss2lib" = "ibmtss" -o "$tss2lib" AC_PATH_PROG(SWTPM, swtpm) SWTPM_IOCTL="" +TPM2_STARTUP="" +TSSTARTUP="" if test "$SWTPM" != ""; then AC_PATH_PROG(SWTPM_IOCTL, swtpm_ioctl) + AC_PATH_PROG(TPM2_STARTUP, tpm2_startup) + AC_PATH_PROG(TSSTARTUP, tsstartup) fi # The Intel/TCG TSS can only *create* keys @@ -733,7 +737,7 @@ if test "$test_hwtpm" = "yes" -a "$TPM2TSS_GENKEY$CREATE_TPM2_KEY" = ""; then fi AM_CONDITIONAL(TEST_HWTPM, [ test "$test_hwtpm" = "yes" ]) -AM_CONDITIONAL(TEST_SWTPM, [ test "$SWTPM_IOCTL" != "" ]) +AM_CONDITIONAL(TEST_SWTPM, [ test "$SWTPM_IOCTL" != "" -a \( "$TPM2_STARTUP" != "" -o "$TSSTARTUP" != "" \) ]) AM_CONDITIONAL(TEST_TPM2_CREATE, [ test "$TPM2TSS_GENKEY" != "" ]) AM_CONDITIONAL(TEST_TPM2_IMPORT, [ test "$CREATE_TPM2_KEY" != "" ]) -- 2.50.1