ima-evm-utils: Change tpm2_pcr_read() to use C code
PATCH 3/5 ima-evm-utils: Change tpm2_pcr_read() to use C code
Replace the call out to the command line tools with C functions.
The algorithm_string_to_algid() function supports only the digest algorithms in use. The table has place holders for other algorithms as they are needed and the C strings are defined.
The table can also be used for an algorithm ID to string function if it's ever needed.
When using the IBM TSS, link in its library.
Signed-off-by Ken Goldman <[email protected]>
--- src/Makefile.am | 1 + src/pcr_tsspcrread.c | 156 +++++++++++++++++++++++++++++++++---------- 2 files changed, 123 insertions(+), 34 deletions(-)
src/Makefile.am +1 -0
@@ -26,6 +26,7 @@ if USE_PCRTSS evmctl_SOURCES += pcr_tss.c else evmctl_SOURCES += pcr_tsspcrread.c +evmctl_LDADD += -libmtss endif AM_CPPFLAGS = -I$(top_srcdir) -include config.h
src/pcr_tsspcrread.c +122 -34
172 lines not on this page · raw message
Signature · 1 line
2.25.1