[v8,9/9] ima-evm-utils: Log hash_algo with hash value in verbose mode
diff mbox series

Message ID 20190703155015.14262-10-vt@altlinux.org
State New
Headers show
Series
  • [v8,1/9] ima-evm-utils: Convert read_pub_key to EVP_PKEY API
Related show

Commit Message

Vitaly Chikunov July 3, 2019, 3:50 p.m. UTC
It's useful to know not just a hash value but also which algorithm is
used.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
 src/libimaevm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/src/libimaevm.c b/src/libimaevm.c
index caf1237..51d6c33 100644
--- a/src/libimaevm.c
+++ b/src/libimaevm.c
@@ -460,7 +460,7 @@  int verify_hash_v2(const char *file, const unsigned char *hash, int size,
 	const char *st;
 
 	if (params.verbose > LOG_INFO) {
-		log_info("hash: ");
+		log_info("hash(%s): ", params.hash_algo);
 		log_dump(hash, size);
 	}
 
@@ -880,7 +880,7 @@  int sign_hash_v2(const char *algo, const unsigned char *hash, int size, const ch
 		return -1;
 	}
 
-	log_info("hash: ");
+	log_info("hash(%s): ", params.hash_algo);
 	log_dump(hash, size);
 
 	pkey = read_priv_pkey(keyfile, params.keypass);