Lines Matching refs:hash
205 struct ima_max_digest_data *hash) in ima_get_verity_digest() argument
214 digest_len = fsverity_get_digest(iint->inode, hash->digest, NULL, &alg); in ima_get_verity_digest()
225 hash->hdr.algo = alg; in ima_get_verity_digest()
226 hash->hdr.length = digest_len; in ima_get_verity_digest()
248 struct ima_max_digest_data hash; in ima_collect_measurement() local
276 hash.hdr.algo = algo; in ima_collect_measurement()
277 hash.hdr.length = hash_digest_size[algo]; in ima_collect_measurement()
280 memset(&hash.digest, 0, sizeof(hash.digest)); in ima_collect_measurement()
283 if (!ima_get_verity_digest(iint, &hash)) { in ima_collect_measurement()
288 result = ima_calc_buffer_hash(buf, size, &hash.hdr); in ima_collect_measurement()
290 result = ima_calc_file_hash(file, &hash.hdr); in ima_collect_measurement()
296 length = sizeof(hash.hdr) + hash.hdr.length; in ima_collect_measurement()
304 memcpy(iint->ima_hash, &hash, length); in ima_collect_measurement()
389 char *hash; in ima_audit_measurement() local
396 hash = kzalloc((iint->ima_hash->length * 2) + 1, GFP_KERNEL); in ima_audit_measurement()
397 if (!hash) in ima_audit_measurement()
401 hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]); in ima_audit_measurement()
402 hash[i * 2] = '\0'; in ima_audit_measurement()
411 audit_log_format(ab, " hash=\"%s:%s\"", algo_name, hash); in ima_audit_measurement()
418 kfree(hash); in ima_audit_measurement()