aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2018-11-27 13:20:38 -0800
committerTadeusz Struk <tadeusz.struk@intel.com>2018-11-27 15:44:12 -0800
commitfa423ad53c17d76284181d1715aeadecd9f438d6 (patch)
treea4fa814dc47fa4b4cd1526ea472427e86b5dd760 /configure.ac
parent986ff26ba46bfe403f5052b00bc43d5f610ef0e8 (diff)
downloadtpm2-tss-fa423ad53c17d76284181d1715aeadecd9f438d6.tar.gz
tcti: add support for partial reads
This enables partial reads in tcti-device. The feature has dependecy on the same being enable in the driver so it is disabled by default. It can be enabled by a new configure time option --enable-tcti-partial-reads=yes By enabling this the Tss_ExecuteFinish function will call Tss2_Tcti_Receive() twice. First with a NULL receive buffer, which will cause the TCTI device to read only 10 bytes response header, and return the actuall response size. Then the second call to Tss2_Tcti_Receive() will read the remaining of the response. NOTE: If this feature is not enabled in the driver then the first read will cause the response by dropped after the first read and the subsequent read will cause the connection to be closed and an IO error returned. Fixes: #1102 The driver support for partial reads has been added with commit: 8f82ffbc5b0b5e9a4546a2c8ab3366758ef76c62 Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4c2b9009..7a90ed0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,15 @@ AC_ARG_ENABLE([tcti-device-async],
AS_IF([test "x$enable_tcti_device_async" = "xyes"],
AC_DEFINE([TCTI_ASYNC],[1]))
+AC_ARG_ENABLE([tcti-partial-reads],
+ AS_HELP_STRING([--enable-tcti-partial-reads],
+ [Enable partial reads for TCTI device
+ (note: This needs to be supported by the kernel driver). default is no]),
+ [enable_tcti_partial_reads=$enableval],
+ [enable_tcti_partial_reads=no])
+AS_IF([test "x$enable_tcti_partial_reads" = "xyes"],
+ AC_DEFINE([TCTI_PARTIAL_READ],[1]))
+
AC_ARG_WITH([crypto],
[AS_HELP_STRING([--with-crypto={gcrypt,ossl}],
[sets the ESAPI crypto backend (default is OpenSSL)])],
@@ -319,5 +328,6 @@ AC_MSG_RESULT([
maxloglevel: $with_maxloglevel
doxygen: $DX_FLAG_doc $enable_doxygen_doc
tcti-device-async: $enable_tcti_device_async
+ tcti-partial-read: $enable_tcti_partial_reads
crypto backend: $with_crypto
])