aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2021-03-03 17:20:26 -0800
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2021-03-04 09:11:32 -0800
commit28ec2da0d41f60fff931d3febfb3e5667143bc1e (patch)
treeb3bf20ecffd9d8aa83beea2c5b5bf62ec8072e33
parentadf3ccb1641d51bab01e987fea11789ebc0de7b0 (diff)
downloadopenssl_tpm2_engine-28ec2da0d41f60fff931d3febfb3e5667143bc1e.tar.gz
configure: add a check for a missing Intel TSS API (Esys_TR_GetTpmHandle)
Without it handle abstraction can't be done properly, so it is fairly essential to the operation of the TSS. The check is done as a library functional check instead of a version in case this rather essential API gets backported. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 47c28dc..d6c6c86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,6 +112,17 @@ CPPFLAGS="$CPPFLAGS -DTPM_POSIX"
AC_CHECK_HEADER([tss2/tss.h],[AC_DEFINE(TSS_INCLUDE,tss2)],
AC_CHECK_HEADER([ibmtss/tss.h],[AC_DEFINE(TSS_INCLUDE,ibmtss)],
AC_MSG_ERROR([No TSS2 include directory found])))
+else
+##
+# Intel TSS has an API issue: Esys_TR_GetTpmHandle wasn't introduced
+# until version 2.4.0.
+#
+# Note: the missing API is fairly serious and is also easily backportable
+# so keep the check below as is intead of going by library version number.
+##
+AC_CHECK_LIB(tss2-esys, Esys_TR_GetTpmHandle, [], [
+ AC_MSG_ERROR([Need Esys_TR_GetTpmHandle API (usually requires Intel TSS 2.4.0 or later)
+ ])])
fi
AC_PATH_PROG(TPMSERVER, tpm_server,,/bin:/usr/bin:/usr/lib/ibmtss:/usr/libexec/ibmtss)