mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048
@ 2025-06-12  9:06 Ahmad Fatoum
  2025-06-12  9:06 ` [PATCH 2/2] ARM: multi_v7/8_defconfig: enable FIT image support Ahmad Fatoum
  2025-06-17  7:15 ` [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048 Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2025-06-12  9:06 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We are going to expand use of this key in testing, so give it a more
generic name.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
Will be used in test_fit.py
---
 test/self/Makefile                                   |  4 ++--
 test/self/{jwt_test.pem => development_rsa2048.pem}  |  0
 ...m.c_shipped => development_rsa2048.pem.c_shipped} | 12 ++++++------
 test/self/jwt.c                                      |  4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)
 rename test/self/{jwt_test.pem => development_rsa2048.pem} (100%)
 rename test/self/{jwt_test.pem.c_shipped => development_rsa2048.pem.c_shipped} (86%)

diff --git a/test/self/Makefile b/test/self/Makefile
index 8cd2a4c526c8..6cf857ee98ff 100644
--- a/test/self/Makefile
+++ b/test/self/Makefile
@@ -10,7 +10,7 @@ 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 jwt_test.pem.o
+obj-$(CONFIG_SELFTEST_JWT) += jwt.o development_rsa2048.pem.o
 obj-$(CONFIG_SELFTEST_DIGEST) += digest.o
 obj-$(CONFIG_SELFTEST_MMU) += mmu.o
 obj-$(CONFIG_SELFTEST_STRING) += string.o
@@ -22,7 +22,7 @@ obj-$(CONFIG_SELFTEST_TLV) += tlv.o tlv.dtb.o
 
 ifdef REGENERATE_KEYTOC
 
-$(obj)/jwt_test.pem.c_shipped: $(src)/jwt_test.pem FORCE
+$(obj)/development_rsa2048.pem.c_shipped: $(src)/development_rsa2048.pem FORCE
 	$(call if_changed,public_keys,$(basename $(target-stem)):$<,-s)
 
 endif
diff --git a/test/self/jwt_test.pem b/test/self/development_rsa2048.pem
similarity index 100%
rename from test/self/jwt_test.pem
rename to test/self/development_rsa2048.pem
diff --git a/test/self/jwt_test.pem.c_shipped b/test/self/development_rsa2048.pem.c_shipped
similarity index 86%
rename from test/self/jwt_test.pem.c_shipped
rename to test/self/development_rsa2048.pem.c_shipped
index 5d4df1107cf5..d25b075cbdf7 100644
--- a/test/self/jwt_test.pem.c_shipped
+++ b/test/self/development_rsa2048.pem.c_shipped
@@ -1,7 +1,7 @@
 #include <crypto/ecdsa.h>
 #include <crypto/rsa.h>
 
-static uint32_t jwt_test_modulus[] = {
+static uint32_t development_rsa2048_modulus[] = {
 	0x5df6dc9b, 0xdc2256e3, 0xa786531a, 0x00012002,
 	0x231a85db, 0xe95fe2b1, 0xd68d022d, 0x5df86ca7,
 	0x2fbd6865, 0x559e1658, 0x4fd9d3f0, 0xa5938e90,
@@ -20,7 +20,7 @@ static uint32_t jwt_test_modulus[] = {
 	0x1f6328e2, 0xc2a33331, 0xb7d52cf1, 0xbb5494d4,
 };
 
-static uint32_t jwt_test_rr[] = {
+static uint32_t development_rsa2048_rr[] = {
 	0xec4954b7, 0x61f69199, 0x9e489481, 0x14f25ec8,
 	0x712de1ab, 0x9c4ed93b, 0xcff16ec3, 0xb6e0c808,
 	0x56551022, 0x1206f0dc, 0x72051e96, 0x6ab07919,
@@ -39,11 +39,11 @@ static uint32_t jwt_test_rr[] = {
 	0x303732ed, 0x6660f318, 0xe3a7df4c, 0x6a784bd5,
 };
 
-struct rsa_public_key __key_jwt_test;
-struct rsa_public_key __key_jwt_test = {
+struct rsa_public_key __key_development_rsa2048;
+struct rsa_public_key __key_development_rsa2048 = {
 	.len = 64,
 	.n0inv = 0x17d8566d,
-	.modulus = jwt_test_modulus,
-	.rr = jwt_test_rr,
+	.modulus = development_rsa2048_modulus,
+	.rr = development_rsa2048_rr,
 	.exponent = 0x10001,
 };
diff --git a/test/self/jwt.c b/test/self/jwt.c
index 1d58bb22da7a..2ef32d8cad06 100644
--- a/test/self/jwt.c
+++ b/test/self/jwt.c
@@ -72,11 +72,11 @@ static void test_jwt(void)
 	char *jwt_rs256_mangled, *ch;
 	struct jwt_key jwt_key;
 	struct jwt *jwt;
-	extern const struct rsa_public_key __key_jwt_test;
+	extern const struct rsa_public_key __key_development_rsa2048;
 	int old_loglevel;
 
 	jwt_key.alg = JWT_ALG_RS256;
-	jwt_key.material.rsa_pub = &__key_jwt_test;
+	jwt_key.material.rsa_pub = &__key_development_rsa2048;
 	total_tests++;
 
 	jwt = jwt_decode(jwt_rs256, &jwt_key);
-- 
2.39.5




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ARM: multi_v7/8_defconfig: enable FIT image support
  2025-06-12  9:06 [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048 Ahmad Fatoum
@ 2025-06-12  9:06 ` Ahmad Fatoum
  2025-06-17  7:15 ` [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048 Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2025-06-12  9:06 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We need this in CI tests, but it's a useful thing to enable anyhow.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/configs/multi_v7_defconfig | 1 +
 arch/arm/configs/multi_v8_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index de2d41e633fa..4fb696a10626 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -107,6 +107,7 @@ CONFIG_BOOTM_INITRD=y
 CONFIG_BOOTM_OFTREE=y
 CONFIG_BOOTM_OFTREE_UIMAGE=y
 CONFIG_BOOTM_AIMAGE=y
+CONFIG_BOOTM_FITIMAGE=y
 CONFIG_BLSPEC=y
 CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_CONSOLE_ALLOW_COLOR=y
diff --git a/arch/arm/configs/multi_v8_defconfig b/arch/arm/configs/multi_v8_defconfig
index ca3c891b4679..3d3f3254df20 100644
--- a/arch/arm/configs/multi_v8_defconfig
+++ b/arch/arm/configs/multi_v8_defconfig
@@ -60,6 +60,7 @@ CONFIG_BOOTM_VERBOSE=y
 CONFIG_BOOTM_INITRD=y
 CONFIG_BOOTM_OFTREE_UIMAGE=y
 CONFIG_BOOTM_AIMAGE=y
+CONFIG_BOOTM_FITIMAGE=y
 CONFIG_BLSPEC=y
 CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_CONSOLE_ALLOW_COLOR=y
-- 
2.39.5




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048
  2025-06-12  9:06 [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048 Ahmad Fatoum
  2025-06-12  9:06 ` [PATCH 2/2] ARM: multi_v7/8_defconfig: enable FIT image support Ahmad Fatoum
@ 2025-06-17  7:15 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2025-06-17  7:15 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Thu, 12 Jun 2025 11:06:10 +0200, Ahmad Fatoum wrote:
> We are going to expand use of this key in testing, so give it a more
> generic name.
> 
> 

Applied, thanks!

[1/2] test: self: jwt: rename jwt_test key to development_rsa2048
      https://git.pengutronix.de/cgit/barebox/commit/?id=09984f6b67d6 (link may not be stable)
[2/2] ARM: multi_v7/8_defconfig: enable FIT image support
      https://git.pengutronix.de/cgit/barebox/commit/?id=bf798231e51c (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-17  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-12  9:06 [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048 Ahmad Fatoum
2025-06-12  9:06 ` [PATCH 2/2] ARM: multi_v7/8_defconfig: enable FIT image support Ahmad Fatoum
2025-06-17  7:15 ` [PATCH 1/2] test: self: jwt: rename jwt_test key to development_rsa2048 Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox