File tree 4 files changed +44
-342
lines changed
4 files changed +44
-342
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ extern "C" {
23
23
#include <stdint.h>
24
24
#include <stdbool.h>
25
25
#include <strings.h>
26
+ #include <modem/modem_jwt.h>
26
27
27
28
/** @brief Maximum size of a JWT string, could be used to allocate JWT
28
29
* output buffer.
@@ -44,25 +45,14 @@ extern "C" {
44
45
/** @brief Size in bytes of each JWT String field */
45
46
#define APP_JWT_CLAIM_MAX_SIZE 64
46
47
47
- /** @brief The type of key to be used for signing the JWT. */
48
- enum app_jwt_key_type {
49
- JWT_KEY_TYPE_CLIENT_PRIV = 2 ,
50
- JWT_KEY_TYPE_ENDORSEMENT = 8 ,
51
- };
52
-
53
- /** @brief JWT signing algorithm */
54
- enum app_jwt_alg_type {
55
- JWT_ALG_TYPE_ES256 = 0 ,
56
- };
57
-
58
48
/** @brief JWT parameters required for JWT generation and pointer to generated JWT */
59
49
struct app_jwt_data {
60
50
/** Sec tag to use for JWT signing */
61
51
unsigned int sec_tag ;
62
52
/** Key type in the specified sec tag */
63
- enum app_jwt_key_type key_type ;
53
+ enum jwt_key_type key_type ;
64
54
/** JWT signing algorithm */
65
- enum app_jwt_alg_type alg ;
55
+ enum jwt_alg_type alg ;
66
56
67
57
/**
68
58
* Indicates if a 'kid' claim is requiered or not, if set to 1, 'kid' claim
Original file line number Diff line number Diff line change 6
6
7
7
menuconfig APP_JWT
8
8
bool "Application JWT Library"
9
- depends on SSF_CLIENT && SSF_PSA_CRYPTO_SERVICE_ENABLED && SSF_DEVICE_INFO_SERVICE_ENABLED
10
9
select BASE64
11
10
# Needed for time and date
12
11
select DATE_TIME
Original file line number Diff line number Diff line change @@ -103,14 +103,7 @@ config NRF_CLOUD_JWT_SOURCE_CUSTOM
103
103
select EXPERIMENTAL
104
104
select TLS_CREDENTIALS
105
105
select BASE64
106
- select TINYCRYPT
107
- select TINYCRYPT_SHA256
108
- select TINYCRYPT_ECC_DSA
109
- select TINYCRYPT_CTR_PRNG
110
- select TINYCRYPT_AES
111
- select CJSON_LIB
112
- depends on NEWLIB_LIBC_FLOAT_PRINTF || PICOLIBC_IO_FLOAT
113
- depends on DATE_TIME
106
+ select APP_JWT
114
107
help
115
108
JWTs are created and signed by the nRF Cloud library, not the modem.
116
109
The signing key is obtained from the TLS credentials module.
You can’t perform that action at this time.
0 commit comments