lkml.org 
[lkml]   [2013]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] MODSIG: use pre-generated X.509 key by MODPUBKEY
Date
If MODPUBKEY is specified and other than default ./signing_key.x509, use
that key instead of generating one on-the-fly.

Signed-off-by: Eric Miao <eric.miao@nvidia.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Dan Willemsen <dwillemsen@nvidia.com>
---
kernel/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/kernel/Makefile b/kernel/Makefile
index 1ce4755..66c7c32 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -165,6 +165,13 @@ ifndef CONFIG_MODULE_SIG_HASH
$(error Could not determine digest type to use from kernel config)
endif

+ifneq ($(MODPUBKEY),./signing_key.x509)
+signing_key.x509: $(MODPUBKEY)
+ @echo "###"
+ @echo "### Use pre-generated X.509 key pair for signing modules."
+ @echo "###"
+ cp -f $< $@
+else
signing_key.priv signing_key.x509: x509.genkey
@echo "###"
@echo "### Now generating an X.509 key pair to be used for signing modules."
@@ -202,3 +209,4 @@ x509.genkey:
@echo >>x509.genkey "subjectKeyIdentifier=hash"
@echo >>x509.genkey "authorityKeyIdentifier=keyid"
endif
+endif
--
1.8.4.1


\
 
 \ /
  Last update: 2013-11-05 01:21    [W:0.032 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site