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

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