summaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-12-14 11:53:45 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-01-08 17:46:35 +0900
commitc537e4d04eb75274bf03e6a2a8d6ece25d9d16f6 (patch)
tree99438cb10dafb5d578797a5aaa7a46f585a042ce /certs
parent4fbce819337a6705559788ff7e9583a4703edcb7 (diff)
downloadlinux-c537e4d04eb75274bf03e6a2a8d6ece25d9d16f6.tar.gz
linux-c537e4d04eb75274bf03e6a2a8d6ece25d9d16f6.tar.bz2
linux-c537e4d04eb75274bf03e6a2a8d6ece25d9d16f6.zip
certs: use $< and $@ to simplify the key generation rule
Do not repeat $(obj)/x509.genkey or $(obj)/signing_key.pem Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <n.schier@avm.de>
Diffstat (limited to 'certs')
-rw-r--r--certs/Makefile5
1 files changed, 2 insertions, 3 deletions
diff --git a/certs/Makefile b/certs/Makefile
index a702b70f3cb9..aba9e782f940 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -60,9 +60,8 @@ keytype-$(CONFIG_MODULE_SIG_KEY_TYPE_ECDSA) := -newkey ec -pkeyopt ec_paramgen_c
quiet_cmd_gen_key = GENKEY $@
cmd_gen_key = openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \
- -batch -x509 -config $(obj)/x509.genkey \
- -outform PEM -out $(obj)/signing_key.pem \
- -keyout $(obj)/signing_key.pem $(keytype-y) 2>&1
+ -batch -x509 -config $< \
+ -outform PEM -out $@ -keyout $@ $(keytype-y) 2>&1
$(obj)/signing_key.pem: $(obj)/x509.genkey FORCE
$(call if_changed,gen_key)