Commit 59637d5e authored by Mimi Zohar's avatar Mimi Zohar

integrity: support new struct public_key_signature encoding field

On systems with IMA-appraisal enabled with a policy requiring file
signatures, the "good" signature values are stored on the filesystem as
extended attributes (security.ima).  Signature verification failure
would normally be limited to just a particular file (eg. executable),
but during boot signature verification failure could result in a system
hang.

Defining and requiring a new public_key_signature field requires all
callers of asymmetric signature verification to be updated to reflect
the change.  This patch updates the integrity asymmetric_verify()
caller.

Fixes: 82f94f24 ("KEYS: Provide software public key query function [ver #2]")
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: default avatarDenis Kenzior <denkenz@gmail.com>
parent 26b76320
...@@ -106,6 +106,7 @@ int asymmetric_verify(struct key *keyring, const char *sig, ...@@ -106,6 +106,7 @@ int asymmetric_verify(struct key *keyring, const char *sig,
pks.pkey_algo = "rsa"; pks.pkey_algo = "rsa";
pks.hash_algo = hash_algo_name[hdr->hash_algo]; pks.hash_algo = hash_algo_name[hdr->hash_algo];
pks.encoding = "pkcs1";
pks.digest = (u8 *)data; pks.digest = (u8 *)data;
pks.digest_size = datalen; pks.digest_size = datalen;
pks.s = hdr->sig; pks.s = hdr->sig;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment