From 95111d72a7352ae8b3abfbca1d490b55ec23241b Mon Sep 17 00:00:00 2001 From: Juergen Repp Date: Tue, 30 Jan 2024 17:16:40 +0100 Subject: [PATCH] FAPI Test: Fix check with self signed certificate. * The test is now skipped if no ek_cert_less is set. * The test is moved to the tests without device. Signed-off-by: Juergen Repp --- Makefile-test.am | 4 ++-- test/integration/fapi-provisioning-cert-error.int.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile-test.am b/Makefile-test.am index 44bd795fb..0a6aa73bd 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -404,7 +404,6 @@ FAPI_TESTS_INTEGRATION = \ test/integration/fapi-policy-or-nv-read-write.fint \ test/integration/fapi-second-provisioning.fint \ test/integration/fapi-provisioning-error.fint \ - test/integration/fapi-provisioning-cert-error.fint \ test/integration/fapi-info.fint \ test/integration/fapi-unseal.fint \ test/integration/fapi-unseal-persistent.fint @@ -434,7 +433,8 @@ FAPI_TESTS_INTEGRATION += \ test/integration/fapi-quote-destructive-eventlog.fint \ test/integration/fapi-quote-destructive-eventlog-pc-client.fint \ test/integration/fapi-provisioning-with-template.fint \ - test/integration/fapi-provisioning-with-template-rsa.fint + test/integration/fapi-provisioning-with-template-rsa.fint \ + test/integration/fapi-provisioning-cert-error.fint endif #!TESTDEVICE diff --git a/test/integration/fapi-provisioning-cert-error.int.c b/test/integration/fapi-provisioning-cert-error.int.c index 9e87b6779..43c2c6b0a 100644 --- a/test/integration/fapi-provisioning-cert-error.int.c +++ b/test/integration/fapi-provisioning-cert-error.int.c @@ -40,11 +40,10 @@ test_fapi_test_provisioning_cert_error(FAPI_CONTEXT *context) { TSS2_RC r; -#ifndef SELF_SIGNED_CERTIFICATE +#if !defined(SELF_SIGNED_CERTIFICATE) || defined(FAPI_TEST_EK_CERT_LESS) return EXIT_SKIP; #endif - setenv("FAPI_TEST_ROOT_CERT", "self", 1); setenv("FAPI_TEST_INT_CERT", "./ca/root-ca/root-ca.cert.pem", 1);