summaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima.h
diff options
context:
space:
mode:
authorMimi Zohar2013-03-12 01:29:47 +0100
committerMimi Zohar2013-10-25 23:17:00 +0200
commit140d802240a4ba3351494b4ab199964b96f87493 (patch)
tree0fa711063f82e868ef589165e89e7b2298b60025 /security/integrity/ima/ima.h
parentima: use dynamically allocated hash storage (diff)
downloadkernel-qcow2-linux-140d802240a4ba3351494b4ab199964b96f87493.tar.gz
kernel-qcow2-linux-140d802240a4ba3351494b4ab199964b96f87493.tar.xz
kernel-qcow2-linux-140d802240a4ba3351494b4ab199964b96f87493.zip
ima: differentiate between template hash and file data hash sizes
The TPM v1.2 limits the template hash size to 20 bytes. This patch differentiates between the template hash size, as defined in the ima_template_entry, and the file data hash size, as defined in the ima_template_data. Subsequent patches add support for different file data hash algorithms. Change log: - hash digest definition in ima_store_template() should be TPM_DIGEST_SIZE Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima.h')
-rw-r--r--security/integrity/ima/ima.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
index efcdef2bf1bc..52393edfbfd9 100644
--- a/security/integrity/ima/ima.h
+++ b/security/integrity/ima/ima.h
@@ -49,7 +49,7 @@ struct ima_template_data {
};
struct ima_template_entry {
- u8 digest[IMA_DIGEST_SIZE]; /* sha1 or md5 measurement hash */
+ u8 digest[TPM_DIGEST_SIZE]; /* sha1 or md5 measurement hash */
const char *template_name;
int template_len;
struct ima_template_data template;