[2/2] ima-evm-utils: Show used hash algo in verbose mode
diff mbox series

Message ID 20190725061306.30515-2-vt@altlinux.org
State New
Headers show
Series
  • [1/2] ima-evm-utils: Do not allow fallback and unknown hash algos
Related show

Commit Message

Vitaly Chikunov July 25, 2019, 6:13 a.m. UTC
This could be useful for users.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
This will conflict with not accepted `params' rename patch.

 src/evmctl.c    | 2 +-
 src/libimaevm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Mimi Zohar July 25, 2019, 1:49 p.m. UTC | #1
On Thu, 2019-07-25 at 09:13 +0300, Vitaly Chikunov wrote:
> This could be useful for users.
> 
> Signed-off-by: Vitaly Chikunov <vt@altlinux.org>

Thanks!

Mimi

Patch
diff mbox series

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);