Commit 54c8b517 authored by Masahiro Yamada's avatar Masahiro Yamada

certs: use 'cmd' to hide openssl output in silent builds more simply

Commit 5d06ee20 ("modsign: hide openssl output in silent builds")
silenced the key generation log from openssl in silent builds.

Since commit 174a1dcc ("kbuild: sink stdout from cmd for silent
build"), the 'cmd' macro can handle it in a cleaner way.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent f8487d28
...@@ -51,9 +51,6 @@ ifdef SIGN_KEY ...@@ -51,9 +51,6 @@ ifdef SIGN_KEY
# #
############################################################################### ###############################################################################
redirect_openssl = 2>&1
quiet_redirect_openssl = 2>&1
silent_redirect_openssl = 2>/dev/null
openssl_available = $(shell openssl help 2>/dev/null && echo yes) openssl_available = $(shell openssl help 2>/dev/null && echo yes)
# We do it this way rather than having a boolean option for enabling an # 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 ...@@ -79,13 +76,16 @@ $(if $(findstring rsaEncryption,$(X509TEXT)),,$(shell rm -f "certs/signing_key.p
endif endif
endif # CONFIG_MODULE_SIG_KEY_TYPE_RSA endif # CONFIG_MODULE_SIG_KEY_TYPE_RSA
$(obj)/signing_key.pem: $(obj)/x509.genkey quiet_cmd_gen_key = GENKEY $@
$(Q)openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \ cmd_gen_key = openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \
-batch -x509 -config $(obj)/x509.genkey \ -batch -x509 -config $(obj)/x509.genkey \
-outform PEM -out $(obj)/signing_key.pem \ -outform PEM -out $(obj)/signing_key.pem \
-keyout $(obj)/signing_key.pem \ -keyout $(obj)/signing_key.pem \
$(keytype_openssl) \ $(keytype_openssl) \
$($(quiet)redirect_openssl) 2>&1
$(obj)/signing_key.pem: $(obj)/x509.genkey
$(call cmd,gen_key)
quiet_cmd_copy_x509_config = COPY $@ quiet_cmd_copy_x509_config = COPY $@
cmd_copy_x509_config = cat $(srctree)/$(src)/default_x509.genkey > $@ cmd_copy_x509_config = cat $(srctree)/$(src)/default_x509.genkey > $@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment