summaryrefslogtreecommitdiffstats
path: root/security/integrity/evm/evm.h
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@huawei.com>2015-10-22 20:26:26 +0200
committerMimi Zohar <zohar@linux.vnet.ibm.com>2015-12-15 14:50:48 +0100
commit26ddabfe96bb7468763c9c92791404d991b16250 (patch)
tree1b97563509dec74394acdb7351bf15d130284909 /security/integrity/evm/evm.h
parentevm: load an x509 certificate from the kernel (diff)
downloadlinux-26ddabfe96bb7468763c9c92791404d991b16250.tar.xz
linux-26ddabfe96bb7468763c9c92791404d991b16250.zip
evm: enable EVM when X509 certificate is loaded
In order to enable EVM before starting the 'init' process, evm_initialized needs to be non-zero. Previously non-zero indicated that the HMAC key was loaded. When EVM loads the X509 before calling 'init', with this patch it is now possible to enable EVM to start signature based verification. This patch defines bits to enable EVM if a key of any type is loaded. Changes in v3: * print error message if key is not set Changes in v2: * EVM_STATE_KEY_SET replaced by EVM_INIT_HMAC * EVM_STATE_X509_SET replaced by EVM_INIT_X509 Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/evm/evm.h')
-rw-r--r--security/integrity/evm/evm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/integrity/evm/evm.h b/security/integrity/evm/evm.h
index 88bfe77efa1c..f5f12727771a 100644
--- a/security/integrity/evm/evm.h
+++ b/security/integrity/evm/evm.h
@@ -21,6 +21,9 @@
#include "../integrity.h"
+#define EVM_INIT_HMAC 0x0001
+#define EVM_INIT_X509 0x0002
+
extern int evm_initialized;
extern char *evm_hmac;
extern char *evm_hash;