jwt: remove TinyCrypt usage

As part of TinyCrypt deprecation process (#79566) this commit
removes usage of this library from the JWT subsystem and its
related tests.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
Valerio Setti 2024-10-10 15:45:08 +02:00 committed by Mahesh Mahadevan
commit 7f5574817f
9 changed files with 57 additions and 167 deletions

View file

@ -4,7 +4,7 @@
*
*/
#if defined(CONFIG_JWT_SIGN_RSA)
#if defined(CONFIG_JWT_SIGN_RSA_PSA) || defined(CONFIG_JWT_SIGN_RSA_LEGACY)
/* To generate the key in the correct format use the following command:
* $ openssl genrsa 2048 | openssl rsa -outform DER | xxd -i
@ -113,7 +113,7 @@ unsigned char jwt_test_private_der[] = {
0x05, 0xfd, 0x71, 0xb0, 0x3e
};
#else /* CONFIG_JWT_SIGN_ECDSA */
#else /* CONFIG_JWT_SIGN_ECDSA_PSA */
/* Here's how to generate the key in the correct format:
* - generate the key using OpenSSL:

View file

@ -9,24 +9,17 @@ common:
extra_configs:
- CONFIG_TEST_RANDOM_GENERATOR=y
tests:
libraries.encoding.jwt.ecdsa.legacy:
extra_configs:
- CONFIG_JWT_SIGN_ECDSA=y
- CONFIG_JWT_USE_LEGACY=y
libraries.encoding.jwt.ecdsa.psa:
extra_configs:
- CONFIG_JWT_SIGN_ECDSA=y
- CONFIG_JWT_USE_PSA=y
- CONFIG_JWT_SIGN_ECDSA_PSA=y
- CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG=y
- CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG=y
libraries.encoding.jwt.rsa.legacy:
filter: CSPRNG_ENABLED
extra_configs:
- CONFIG_JWT_SIGN_RSA=y
- CONFIG_JWT_USE_LEGACY=y
- CONFIG_JWT_SIGN_RSA_LEGACY=y
libraries.encoding.jwt.rsa.psa:
extra_configs:
- CONFIG_JWT_SIGN_RSA=y
- CONFIG_JWT_USE_PSA=y
- CONFIG_JWT_SIGN_RSA_PSA=y
- CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG=y
- CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG=y