Skip to content

Commit

Permalink
lib: modem_jwt: Use unsigned int for sec_tag
Browse files Browse the repository at this point in the history
Modem sec tags are unsigned, so use that representation
instead of plain int.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
  • Loading branch information
plskeggs committed Jul 18, 2023
1 parent f56c814 commit acd755c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/modem/modem_jwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum jwt_alg_type {
/** @brief JWT parameters required for JWT generation and pointer to generated JWT */
struct jwt_data {
/** Modem sec tag to use for JWT signing */
int sec_tag;
unsigned int sec_tag;
/** Key type in the specified sec tag */
enum jwt_key_type key;
/** JWT signing algorithm */
Expand Down
2 changes: 1 addition & 1 deletion lib/modem_jwt/modem_jwt.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <zephyr/sys/base64.h>

#define JWT_CMD_TEMPLATE "AT%%JWT=%d,%u,\"%s\",\"%s\""
#define JWT_CMD_TEMPLATE_SEC_TAG "AT%%JWT=%d,%u,\"%s\",\"%s\",%d,%d"
#define JWT_CMD_TEMPLATE_SEC_TAG "AT%%JWT=%d,%u,\"%s\",\"%s\",%u,%d"
#define MAX_INT_PRINT_SZ 11
#define JWT_CMD_PRINT_INT_SZ (MAX_INT_PRINT_SZ * 4)
#define GET_BASE64_DECODED_LEN(n) (3 * n / 4)
Expand Down

0 comments on commit acd755c

Please sign in to comment.