Skip to contentSkip to conversation

Restrict read access to private module signing key

PATCH New Luis Ressel 1 participant 1 message Jan 6, 2016 Certificate handling

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Restrict read access to private module signing key

I forgot to CC this mailing list.

Begin forwarded message:

Date: Sat, 2 Jan 2016 16:13:50 +0100
From: Luis Ressel <[email protected]>
To: [email protected]
Cc: [email protected], David Howells <[email protected]>, David Woodhouse <[email protected]> Subject: [PATCH] Restrict read access to private module signing key

The autogenerated module signing key shouldn't be world-readable.

---
 certs/Makefile | 2 ++
 1 file changed, 2 insertions(+)
certs/Makefile +2 -0
index 28ac694..7f1f082 100644
@@ -49,6 +49,8 @@ $(obj)/signing_key.pem: $(obj)/x509.genkey
 	@echo "### needs to be run as root, and uses a hardware random"
 	@echo "### number generator if one is available."
 	@echo "###"
+	touch $(obj)/signing_key.pem
+	chmod 0600 $(obj)/signing_key.pem
 	openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days

36500 \ -batch -x509 -config $(obj)/x509.genkey \
-outform PEM -out $(obj)/signing_key.pem \

Signature · 1 line
2.6.4