summaryrefslogtreecommitdiffstats
path: root/security/integrity/integrity.h
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-11-18 18:21:31 +1100
committerJames Morris <jmorris@namei.org>2011-11-18 18:21:31 +1100
commit4e2c5b28f8086cd2f678ade0ea21d8c3cc058c53 (patch)
tree789fbdac68279765ade21c576bb22b77a5c112bc /security/integrity/integrity.h
parent8077e8b059232f23fe51fdc42868dcd8ba293549 (diff)
parent15647eb3985ef30dfd657038924dc85c03026733 (diff)
downloadlinux-4e2c5b28f8086cd2f678ade0ea21d8c3cc058c53.tar.bz2
Merge branch 'next-evm-digsig' of git://git.kernel.org/pub/scm/linux/kernel/git/kasatkin/linux-digsig into next
Diffstat (limited to 'security/integrity/integrity.h')
-rw-r--r--security/integrity/integrity.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h
index 3143a3c39868..4da6ba81d153 100644
--- a/security/integrity/integrity.h
+++ b/security/integrity/integrity.h
@@ -46,5 +46,26 @@ struct integrity_iint_cache {
struct integrity_iint_cache *integrity_iint_insert(struct inode *inode);
struct integrity_iint_cache *integrity_iint_find(struct inode *inode);
+#define INTEGRITY_KEYRING_EVM 0
+#define INTEGRITY_KEYRING_MODULE 1
+#define INTEGRITY_KEYRING_IMA 2
+#define INTEGRITY_KEYRING_MAX 3
+
+#ifdef CONFIG_INTEGRITY_DIGSIG
+
+int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen,
+ const char *digest, int digestlen);
+
+#else
+
+static inline int integrity_digsig_verify(const unsigned int id,
+ const char *sig, int siglen,
+ const char *digest, int digestlen)
+{
+ return -EOPNOTSUPP;
+}
+
+#endif /* CONFIG_INTEGRITY_DIGSIG */
+
/* set during initialization */
extern int iint_initialized;