[PATCH] MODSIGN: Support for signing_key.{x509,priv} in the M= directory

From: Michal Marek
Date: Mon Mar 11 2013 - 09:13:11 EST


Allow for the module signing keypair to be supplied when building an
external module.

Signed-off-by: Michal Marek <mmarek@xxxxxxx>
---
Makefile | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index a05ea42..a0c5436 100644
--- a/Makefile
+++ b/Makefile
@@ -721,8 +721,13 @@ export mod_strip_cmd


ifdef CONFIG_MODULE_SIG_ALL
+ifeq ($(KBUILD_EXTMOD),)
MODSECKEY = ./signing_key.priv
MODPUBKEY = ./signing_key.x509
+else
+MODSECKEY = $(firstword $(wildcard $(KBUILD_EXTMOD)/signing_key.priv) ./signing_key.priv)
+MODPUBKEY = $(firstword $(wildcard $(KBUILD_EXTMOD)/signing_key.x509) ./signing_key.x509)
+endif
export MODPUBKEY
mod_sign_cmd = perl $(srctree)/scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODSECKEY) $(MODPUBKEY)
else
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/