summaryrefslogtreecommitdiffstats
path: root/security/integrity/digsig.c
diff options
context:
space:
mode:
authorDmitry Kasatkin <d.kasatkin@samsung.com>2013-10-10 16:12:03 +0900
committerMimi Zohar <zohar@linux.vnet.ibm.com>2013-10-25 17:16:59 -0400
commitb1aaab22e263d0cca1effe319b7d2bf895444219 (patch)
treea46f2285bd884e784d967e4132f71cd2f09565da /security/integrity/digsig.c
parentd3634d0f426bdeb433cb288bdbb0a5e16cf3dbbf (diff)
downloadlinux-b1aaab22e263d0cca1effe319b7d2bf895444219.tar.gz
linux-b1aaab22e263d0cca1effe319b7d2bf895444219.tar.bz2
linux-b1aaab22e263d0cca1effe319b7d2bf895444219.zip
ima: pass full xattr with the signature
For possibility to use xattr type for new signature formats, pass full xattr to the signature verification function. 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.c')
-rw-r--r--security/integrity/digsig.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
index 198e60903685..b4af4ebc5be2 100644
--- a/security/integrity/digsig.c
+++ b/security/integrity/digsig.c
@@ -44,9 +44,10 @@ int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen,
}
}
- switch (sig[0]) {
+ switch (sig[1]) {
case 1:
- return digsig_verify(keyring[id], sig, siglen,
+ /* v1 API expect signature without xattr type */
+ return digsig_verify(keyring[id], sig + 1, siglen - 1,
digest, digestlen);
case 2:
return asymmetric_verify(keyring[id], sig, siglen,