mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-07-13 02:30:42 +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:
@ -44,15 +44,25 @@
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#ifdef HAVE_LIBTSS2_ESYS
|
||||
#include <tss2/tss2_esys.h>
|
||||
# include <tss2/tss2_esys.h>
|
||||
|
||||
#ifdef HAVE_LIBTSS2_RC
|
||||
#include <tss2/tss2_rc.h>
|
||||
#endif
|
||||
#endif
|
||||
# ifdef HAVE_LIBTSS2_RC
|
||||
# include <tss2/tss2_rc.h>
|
||||
# define LIB "tss2-rc-decode"
|
||||
# else
|
||||
# define LIB "tss2-esys"
|
||||
# endif
|
||||
|
||||
#endif /* HAVE_LIBTSS2_ESYS */
|
||||
|
||||
#define USE_FPRINTF
|
||||
#include "imaevm.h"
|
||||
|
||||
int tpm2_pcr_supported(void)
|
||||
{
|
||||
if (imaevm_params.verbose > LOG_INFO)
|
||||
log_info("Using %s to read PCRs.\n", LIB);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user