diff options
author | Dmitry Kasatkin <d.kasatkin@samsung.com> | 2013-04-25 11:44:04 +0400 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2013-10-26 01:16:59 +0400 |
commit | d3634d0f426bdeb433cb288bdbb0a5e16cf3dbbf (patch) | |
tree | 2197b45ddbdfcc81ecdc6b5acaa9292eead795b7 /security/integrity/digsig_asymmetric.c | |
parent | c7c8bb237fdbff932b5e431aebee5ce862ea07d1 (diff) | |
download | linux-d3634d0f426bdeb433cb288bdbb0a5e16cf3dbbf.tar.xz |
ima: read and use signature hash algorithm
All files on the filesystem, currently, are hashed using the same hash
algorithm. In preparation for files from different packages being
signed using different hash algorithms, this patch adds support for
reading the signature hash algorithm from the 'security.ima' extended
attribute and calculates the appropriate file data hash based on it.
Changelog:
- fix scripts Lindent and checkpatch msgs - Mimi
- fix md5 support for older version, which occupied 20 bytes in the
xattr, not the expected 16 bytes. Fix the comparison to compare
only the first 16 bytes.
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/digsig_asymmetric.c')
-rw-r--r-- | security/integrity/digsig_asymmetric.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c index b4754667659d..9eae4809006b 100644 --- a/security/integrity/digsig_asymmetric.c +++ b/security/integrity/digsig_asymmetric.c @@ -20,17 +20,6 @@ #include "integrity.h" /* - * signature format v2 - for using with asymmetric keys - */ -struct signature_v2_hdr { - uint8_t version; /* signature format version */ - uint8_t hash_algo; /* Digest algorithm [enum pkey_hash_algo] */ - uint32_t keyid; /* IMA key identifier - not X509/PGP specific*/ - uint16_t sig_size; /* signature size */ - uint8_t sig[0]; /* signature payload */ -} __packed; - -/* * Request an asymmetric key. */ static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid) |