[PATCH 2/3] test: self: jwt: add dedicated option for development_rsa2048.pem
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Aug 21 13:59:41 PDT 2025
This test key can be useful beyond the JWT selftest, so add an option to
select it.
The key added by the option is stand-alone, i.e., it is not part of the
key ring and won't be consulted for FIT image verification.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
test/Kconfig | 8 ++++++++
test/self/Kconfig | 1 +
test/self/Makefile | 3 ++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/test/Kconfig b/test/Kconfig
index 07b22f09e99b..50162ef5761f 100644
--- a/test/Kconfig
+++ b/test/Kconfig
@@ -46,4 +46,12 @@ config CMD_FUZZ
endif
+config TEST_KEY_RSA2048
+ bool
+ help
+ This is selected by crypto test code that needs a RSA2048 public
+ key. The key added by this option is stand-alone, i.e., it is
+ not part of the key ring and won't be consulted for FIT image
+ verification.
+
endif
diff --git a/test/self/Kconfig b/test/self/Kconfig
index 33d05e4cf205..4c43dfe3940d 100644
--- a/test/self/Kconfig
+++ b/test/self/Kconfig
@@ -86,6 +86,7 @@ config SELFTEST_JSON
config SELFTEST_JWT
bool "JSON Web Token selftest"
depends on JWT
+ select TEST_KEY_RSA2048
config SELFTEST_MMU
bool "MMU remapping selftest"
diff --git a/test/self/Makefile b/test/self/Makefile
index 6cf857ee98ff..9aa8aab78b31 100644
--- a/test/self/Makefile
+++ b/test/self/Makefile
@@ -10,7 +10,8 @@ obj-$(CONFIG_SELFTEST_ENVIRONMENT_VARIABLES) += envvar.o
obj-$(CONFIG_SELFTEST_FS_RAMFS) += ramfs.o
obj-$(CONFIG_SELFTEST_DIRFD) += dirfd.o
obj-$(CONFIG_SELFTEST_JSON) += json.o
-obj-$(CONFIG_SELFTEST_JWT) += jwt.o development_rsa2048.pem.o
+obj-$(CONFIG_SELFTEST_JWT) += jwt.o
+obj-$(CONFIG_TEST_KEY_RSA2048) += development_rsa2048.pem.o
obj-$(CONFIG_SELFTEST_DIGEST) += digest.o
obj-$(CONFIG_SELFTEST_MMU) += mmu.o
obj-$(CONFIG_SELFTEST_STRING) += string.o
--
2.39.5
More information about the barebox
mailing list