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

Signed-off-by: Ahmad Fatoum <a.fat...@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


Reply via email to