chantra / rpms / tpm2-tss

Forked from rpms/tpm2-tss 2 years ago
Clone

Blame SOURCES/0002-FAPI-use-FAPI_TEST_EK_CERT_LESS-with-disable-self-ge.patch

a23473
From d680ea548b3ab066f6bea625af5d4000ca32cfee Mon Sep 17 00:00:00 2001
a23473
From: Jonas Witschel <diabonas@gmx.de>
a23473
Date: Mon, 1 Mar 2021 20:00:17 +0100
a23473
Subject: FAPI: use FAPI_TEST_EK_CERT_LESS with
a23473
 --disable-self-generated-certificate
a23473
MIME-Version: 1.0
a23473
Content-Type: text/plain; charset=UTF-8
a23473
Content-Transfer-Encoding: 8bit
a23473
a23473
Since commit 199b4edc265b2f4758aa22ebf4ed6472a34b9a7a ("FAPI: Fix reading of
a23473
the root certificate for provisioning.") it is required to specify
a23473
--enable-self-generated-certificate in order to make the FAPI integration tests
a23473
pass. This is an option that should usually not be enabled in production builds
a23473
for security reasons, but still some form of integration testing might be
a23473
desirable in this case to verify whether the compiled library works as
a23473
expected. Use FAPI_TEST_EK_CERT_LESS in this case to run the tests without EK
a23473
certificate validation.
a23473
a23473
Signed-off-by: Jonas Witschel <diabonas@gmx.de>
a23473
---
a23473
 configure.ac | 5 +++--
a23473
 1 file changed, 3 insertions(+), 2 deletions(-)
a23473
a23473
diff --git a/configure.ac b/configure.ac
a23473
index d3bbb93d..d4324c9a 100755
a23473
--- a/configure.ac
a23473
+++ b/configure.ac
a23473
@@ -444,8 +444,9 @@ AC_ARG_ENABLE([self-generated-certificate],
a23473
             [AS_HELP_STRING([--enable-self-generated-certificate],
a23473
                             [Alllow usage of self generated root certifcate])],,
a23473
             [enable_self_generated_certificate=no])
a23473
-AS_IF([test "x$enable_self_generated_certificate" == xyes],
a23473
-	[AC_DEFINE([SELF_GENERATED_CERTIFICATE],[1], [Allow usage of self generated root certifcate])])
a23473
+AS_IF([test "x$enable_self_generated_certificate" = xyes],
a23473
+	[AC_DEFINE([SELF_GENERATED_CERTIFICATE], [1], [Allow usage of self generated root certificate])],
a23473
+	[AS_IF([test "x$integration_tcti" != "xdevice"], [AC_DEFINE([FAPI_TEST_EK_CERT_LESS], [1], [Perform integration tests without EK certificate verification])])])
a23473
 
a23473
 
a23473
 AC_SUBST([PATH])
a23473
-- 
a23473
2.26.3
a23473