mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-28 06:33:36 +02:00
ima-evm-utils: include file name on failure to verify signature
Include file name on warning/error indication on signature verification. Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
cf1b8fda8d
commit
fbba18c477
@ -628,13 +628,13 @@ int ima_verify_signature(const char *file, unsigned char *sig, int siglen,
|
|||||||
int hashlen, sig_hash_algo;
|
int hashlen, sig_hash_algo;
|
||||||
|
|
||||||
if (sig[0] != 0x03) {
|
if (sig[0] != 0x03) {
|
||||||
log_err("xattr ima has no signature\n");
|
log_err("%s: xattr ima has no signature\n", file);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sig_hash_algo = imaevm_hash_algo_from_sig(sig + 1);
|
sig_hash_algo = imaevm_hash_algo_from_sig(sig + 1);
|
||||||
if (sig_hash_algo < 0) {
|
if (sig_hash_algo < 0) {
|
||||||
log_err("Invalid signature\n");
|
log_err("%s: Invalid signature\n", file);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* Use hash algorithm as retrieved from signature */
|
/* Use hash algorithm as retrieved from signature */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user