}
static int ima_eventdigest_init_common(u8 *digest, u32 digestsize, u8 hash_algo,
- struct ima_field_data *field_data,
- bool size_limit)
+ struct ima_field_data *field_data)
{
/*
* digest formats:
enum data_formats fmt = DATA_FMT_DIGEST;
u32 offset = 0;
- if (!size_limit) {
+ if (hash_algo < HASH_ALGO__LAST) {
fmt = DATA_FMT_DIGEST_WITH_ALGO;
- if (hash_algo < HASH_ALGO__LAST)
- offset += snprintf(buffer, CRYPTO_MAX_ALG_NAME + 1,
- "%s", hash_algo_name[hash_algo]);
+ offset += snprintf(buffer, CRYPTO_MAX_ALG_NAME + 1, "%s",
+ hash_algo_name[hash_algo]);
buffer[offset] = ':';
offset += 2;
}
cur_digestsize = hash.hdr.length;
out:
return ima_eventdigest_init_common(cur_digest, cur_digestsize,
- HASH_ALGO__LAST, field_data, true);
+ HASH_ALGO__LAST, field_data);
}
/*
hash_algo = iint->ima_hash->algo;
out:
return ima_eventdigest_init_common(cur_digest, cur_digestsize,
- hash_algo, field_data, false);
+ hash_algo, field_data);
}
static int ima_eventname_init_common(struct integrity_iint_cache *iint,