From a1b149bda48afde99cb5f06f2dc7180106b8229b Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Thu, 25 Jul 2019 09:13:06 +0300 Subject: [PATCH] ima-evm-utils: Show used hash algo in verbose mode This could be useful for users. Signed-off-by: Vitaly Chikunov Signed-off-by: Mimi Zohar --- src/evmctl.c | 2 +- src/libimaevm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evmctl.c b/src/evmctl.c index 3766343..75dd163 100644 --- a/src/evmctl.c +++ b/src/evmctl.c @@ -605,7 +605,7 @@ static int hash_ima(const char *file) len += offset; if (params.verbose >= LOG_INFO) - log_info("hash: "); + log_info("hash(%s): ", params.hash_algo); if (sigdump || params.verbose >= LOG_INFO) dump(hash, len); diff --git a/src/libimaevm.c b/src/libimaevm.c index 86c5784..11dbf11 100644 --- a/src/libimaevm.c +++ b/src/libimaevm.c @@ -822,7 +822,7 @@ int sign_hash_v1(const char *hashalgo, const unsigned char *hash, int size, cons return -1; } - log_info("hash: "); + log_info("hash(%s): ", hashalgo); log_dump(hash, size); key = read_priv_key(keyfile, params.keypass);