Skip to content

Commit

Permalink
certs: use $< and $@ to simplify the key generation rule
Browse files Browse the repository at this point in the history
Do not repeat $(obj)/x509.genkey or $(obj)/signing_key.pem

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Nicolas Schier <[email protected]>
  • Loading branch information
masahir0y committed Jan 8, 2022
1 parent 4fbce81 commit c537e4d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions certs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c537e4d

Please sign in to comment.