Skip to content

Commit c28bd74

Browse files
committed
modules: tf-m: add missing argument to builtin key loader functions
TF-M has added a context argument to tfm_plat_err_t. Adjust the definition of our HUK/IAK functions. Message of the upstream commit which made this change: "To allow generic loader functions which load multiple keys. For the time being no loader function actively uses the ctx parameter, but it will be used in RSE in a future patch set" Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent ef46382 commit c28bd74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/trusted-firmware-m/tfm_boards/common/crypto_keys.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#define TFM_NS_PARTITION_ID MAPPED_TZ_NS_AGENT_DEFAULT_CLIENT_ID
2424

2525
#ifdef CONFIG_HW_UNIQUE_KEY
26-
static enum tfm_plat_err_t tfm_plat_get_huk(uint8_t *buf, size_t buf_len, size_t *key_len,
27-
psa_key_bits_t *key_bits, psa_algorithm_t *algorithm,
28-
psa_key_type_t *type)
26+
static enum tfm_plat_err_t tfm_plat_get_huk(const void *ctx, uint8_t *buf, size_t buf_len,
27+
size_t *key_len, psa_key_bits_t *key_bits,
28+
psa_algorithm_t *algorithm, psa_key_type_t *type)
2929
{
3030
if (buf_len < HUK_SIZE_BYTES) {
3131
return TFM_PLAT_ERR_SYSTEM_ERR;
@@ -52,9 +52,9 @@ static enum tfm_plat_err_t tfm_plat_get_huk(uint8_t *buf, size_t buf_len, size_t
5252
#endif /* CONFIG_HW_UNIQUE_KEY */
5353

5454
#ifdef TFM_PARTITION_INITIAL_ATTESTATION
55-
static enum tfm_plat_err_t tfm_plat_get_iak(uint8_t *buf, size_t buf_len, size_t *key_len,
56-
psa_key_bits_t *key_bits, psa_algorithm_t *algorithm,
57-
psa_key_type_t *type)
55+
static enum tfm_plat_err_t tfm_plat_get_iak(const void *ctx, uint8_t *buf, size_t buf_len,
56+
size_t *key_len, psa_key_bits_t *key_bits,
57+
psa_algorithm_t *algorithm, psa_key_type_t *type)
5858
{
5959
int err;
6060

0 commit comments

Comments
 (0)