1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-07-12 10:10:46 +02:00

ima-evm-utils: Check for tsspcrread in runtime

instead of checking in build time as it's runtime dependency.
Also log when tsspcrread not found to make debugging easier.

We search for tsspcrread unless there is tss2-esys with Esys_PCR_Read(),
thus pcr_none.c was dropped as unneeded.

file_exist(), tst_get_path() and MIN() taken from LTP project.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
[zohar@linux.ibm.com: added USE_FPRINTF definitions]
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Petr Vorel
2020-07-15 15:28:17 +02:00
committed by Mimi Zohar
parent 1bf51afb46
commit 80d3fda608
7 changed files with 110 additions and 71 deletions

View File

@ -25,11 +25,7 @@ evmctl_LDADD = $(LIBCRYPTO_LIBS) -lkeyutils libimaevm.la
if USE_PCRTSS
evmctl_SOURCES += pcr_tss.c
else
if USE_PCRTSSPCRREAD
evmctl_SOURCES += pcr_tsspcrread.c
else
evmctl_SOURCES += pcr_none.c
endif
endif
AM_CPPFLAGS = -I$(top_srcdir) -include config.h