[PATCH v3 15/15] crypto: make RSA a visible option

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 6 03:40:28 PDT 2024


With ECDSA support RSA is no longer the only option for FIT image
verification. Make CONFIG_CRYPTO_RSA visible so that the user can
choose. CONFIG_CRYPTO_RSA defaults to yes when FITIMAGE_SIGNATURE is
selected so that existing configs continue to work.

Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
Link: https://lore.barebox.org/20240801055737.3190132-19-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/Kconfig | 1 -
 crypto/Kconfig | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index 4500feb66c..c925b1bd99 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -62,7 +62,6 @@ config FITIMAGE
 	select DIGEST
 
 config FITIMAGE_SIGNATURE
-	select CRYPTO_RSA
 	bool
 
 config LOGBUF
diff --git a/crypto/Kconfig b/crypto/Kconfig
index a90e3e1005..45011802e3 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -116,7 +116,8 @@ config CRYPTO_PBKDF2
 	bool
 
 config CRYPTO_RSA
-	bool
+	bool "RSA support"
+	default y if FITIMAGE_SIGNATURE
 
 config CRYPTO_BUILTIN_KEYS
 	bool "builtin keys"
-- 
2.39.2




More information about the barebox mailing list