Commit c502c78ba7fb5b9cef71e2bd70f12c38ef26e5ab

Authored by Roberto Sassu
Committed by Mimi Zohar
1 parent 4482a44f6a

ima: change the default hash algorithm to SHA1 in ima_eventdigest_ng_init()

Replace HASH_ALGO__LAST with HASH_ALGO_SHA1 as the initial value of
the hash algorithm so that the prefix 'sha1:' is added to violation
digests.

Fix commit:
  4d7aeee ima: define new template ima-ng and template fields d-ng and n-ng

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Cc: <stable@vger.kernel.org> # 3.13.x
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

security/integrity/ima/ima_template_lib.c
... ... @@ -251,7 +251,7 @@
251 251 struct evm_ima_xattr_data *xattr_value,
252 252 int xattr_len, struct ima_field_data *field_data)
253 253 {
254   - u8 *cur_digest = NULL, hash_algo = HASH_ALGO__LAST;
  254 + u8 *cur_digest = NULL, hash_algo = HASH_ALGO_SHA1;
255 255 u32 cur_digestsize = 0;
256 256  
257 257 /* If iint is NULL, we are recording a violation. */