Skip to content

Commit 54c8b51

Browse files
committed
certs: use 'cmd' to hide openssl output in silent builds more simply
Commit 5d06ee2 ("modsign: hide openssl output in silent builds") silenced the key generation log from openssl in silent builds. Since commit 174a1dc ("kbuild: sink stdout from cmd for silent build"), the 'cmd' macro can handle it in a cleaner way. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent f8487d2 commit 54c8b51

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

certs/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ ifdef SIGN_KEY
5151
#
5252
###############################################################################
5353

54-
redirect_openssl = 2>&1
55-
quiet_redirect_openssl = 2>&1
56-
silent_redirect_openssl = 2>/dev/null
5754
openssl_available = $(shell openssl help 2>/dev/null && echo yes)
5855

5956
# We do it this way rather than having a boolean option for enabling an
@@ -79,13 +76,16 @@ $(if $(findstring rsaEncryption,$(X509TEXT)),,$(shell rm -f "certs/signing_key.p
7976
endif
8077
endif # CONFIG_MODULE_SIG_KEY_TYPE_RSA
8178

82-
$(obj)/signing_key.pem: $(obj)/x509.genkey
83-
$(Q)openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \
79+
quiet_cmd_gen_key = GENKEY $@
80+
cmd_gen_key = openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \
8481
-batch -x509 -config $(obj)/x509.genkey \
8582
-outform PEM -out $(obj)/signing_key.pem \
8683
-keyout $(obj)/signing_key.pem \
8784
$(keytype_openssl) \
88-
$($(quiet)redirect_openssl)
85+
2>&1
86+
87+
$(obj)/signing_key.pem: $(obj)/x509.genkey
88+
$(call cmd,gen_key)
8989

9090
quiet_cmd_copy_x509_config = COPY $@
9191
cmd_copy_x509_config = cat $(srctree)/$(src)/default_x509.genkey > $@

0 commit comments

Comments
 (0)