[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210610125623.1553792-5-stefanb@linux.ibm.com>
Date: Thu, 10 Jun 2021 08:56:23 -0400
From: Stefan Berger <stefanb@...ux.ibm.com>
To: jeyu@...nel.org, keyrings@...r.kernel.org, dhowells@...hat.com,
dwmw2@...radead.org, zohar@...ux.ibm.com, jarkko@...nel.org
Cc: nayna@...ux.ibm.com, linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, Stefan Berger <stefanb@...ux.ibm.com>
Subject: [PATCH v6 4/4] certs: Adjustment due to 'Check whether openssl tool is available'
Adjust the previous patch due to fixes applied to the first patch
in the series.
Fixes: 46449892e6e5 ("certs: Add support for using elliptic curve keys for signing modules")
Signed-off-by: Stefan Berger <stefanb@...ux.ibm.com>
---
certs/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/certs/Makefile b/certs/Makefile
index dc9f354dd5f8..4eb69bdadc79 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -66,16 +66,21 @@ ifeq ($(CONFIG_MODULE_SIG_KEY),"certs/signing_key.pem")
ifeq ($(openssl_available),yes)
X509TEXT=$(shell openssl x509 -in $(CONFIG_MODULE_SIG_KEY) -text)
+endif
# Support user changing key type
ifdef CONFIG_MODULE_SIG_KEY_TYPE_ECDSA
keytype_openssl = -newkey ec -pkeyopt ec_paramgen_curve:secp384r1
+ifeq ($(openssl_available),yes)
$(if $(findstring id-ecPublicKey,$(X509TEXT)),,$(shell rm -f $(CONFIG_MODULE_SIG_KEY)))
endif
+endif # CONFIG_MODULE_SIG_KEY_TYPE_ECDSA
ifdef CONFIG_MODULE_SIG_KEY_TYPE_RSA
+ifeq ($(openssl_available),yes)
$(if $(findstring rsaEncryption,$(X509TEXT)),,$(shell rm -f $(CONFIG_MODULE_SIG_KEY)))
endif
+endif # CONFIG_MODULE_SIG_KEY_TYPE_RSA
$(obj)/signing_key.pem: $(obj)/x509.genkey
@$(kecho) "###"
--
2.29.2
Powered by blists - more mailing lists