From a766411306242118a3211404db4ae4870505611e Mon Sep 17 00:00:00 2001 From: Steffen Eiden Date: Mon, 11 Jul 2022 11:51:40 +0200 Subject: [PATCH] pvattest: fix dependency checking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a bug that make still tried to build pvattest even when the compilation of pvattest was turned off. This lead to a build bug when one of the dependencies was not met. Also fixes the check of the OpenSSL version at build time. Fixes: 3ab06d77 ("pvattest: Create, perform, and verify attestation measurements") Signed-off-by: Steffen Eiden Reviewed-by: Marc Hartmayer Signed-off-by: Jan Höppner --- pvattest/src/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pvattest/src/Makefile b/pvattest/src/Makefile index 56ddf427..f389d2ef 100644 --- a/pvattest/src/Makefile +++ b/pvattest/src/Makefile @@ -73,7 +73,7 @@ endif endif endif -all: $(BUILD_TARGETS) .check-dep-$(BIN_PROGRAM) +all: $(BUILD_TARGETS) install: $(INSTALL_TARGETS) @@ -97,7 +97,7 @@ $($(BIN_PROGRAM)_OBJS): .check-dep-$(BIN_PROGRAM) .detect-openssl.dep.c: echo "#include " > $@ echo "#if OPENSSL_VERSION_NUMBER < 0x10101000L" >> $@ - echo " #error openssl version 1.1.0 is required" >> $@ + echo " #error openssl version 1.1.1 is required" >> $@ echo "#endif" >> $@ echo "static void __attribute__((unused)) test(void) {" >> $@ echo " EVP_MD_CTX *ctx = EVP_MD_CTX_new();" >> $@ @@ -112,8 +112,8 @@ $($(BIN_PROGRAM)_OBJS): .check-dep-$(BIN_PROGRAM) "HAVE_GLIB2=0") $(call check_dep, \ "$(BIN_PROGRAM)", \ - "openssl/evp.h", \ - "openssl-devel / libssl-dev version >= 1.1.0", \ + $^, \ + "openssl-devel / libssl-dev version >= 1.1.1", \ "HAVE_OPENSSL=0", \ "-I.") $(call check_dep, \