ima: provide support for arbitrary hash algorithms
authorDmitry Kasatkin <d.kasatkin@samsung.com>
Thu, 25 Apr 2013 07:43:56 +0000 (10:43 +0300)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Fri, 25 Oct 2013 21:16:58 +0000 (17:16 -0400)
commitc7c8bb237fdbff932b5e431aebee5ce862ea07d1
tree4cdbc7c250dd4418b47ab45dd1108848b50f8cff
parent3fe78ca2fb1d61ea598e63fcbf38aec76b36b3a8
ima: provide support for arbitrary hash algorithms

In preparation of supporting more hash algorithms with larger hash sizes
needed for signature verification, this patch replaces the 20 byte sized
digest, with a more flexible structure.  The new structure includes the
hash algorithm, digest size, and digest.

Changelog:
- recalculate filedata hash for the measurement list, if the signature
  hash digest size is greater than 20 bytes.
- use generic HASH_ALGO_
- make ima_calc_file_hash static
- scripts lindent and checkpatch fixes

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
crypto/asymmetric_keys/x509_parser.h
crypto/asymmetric_keys/x509_public_key.c
security/integrity/ima/Kconfig
security/integrity/ima/ima.h
security/integrity/ima/ima_api.c
security/integrity/ima/ima_appraise.c
security/integrity/ima/ima_crypto.c
security/integrity/ima/ima_main.c
security/integrity/integrity.h