Skip to content

Commit 8778214

Browse files
author
Andrzej Kurek
committed
Rename pubkey_for_psa to add_psa_pubkey_prefix
1 parent 0b12f32 commit 8778214

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

atecc608a_se.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ psa_status_t atecc608a_to_psa_error(ATCA_STATUS ret)
125125
* format for pubkeys is 0x04 + x + y. Always use a pubkey buffer in PSA
126126
* format, with enough space for the PSA format. To translate this buffer for
127127
* use with cryptoauthlib, use pubkey_for_driver(). To ensure the buffer is in
128-
* valid PSA format after cryptoauthlib operations, call pubkey_for_psa(). */
128+
* valid PSA format after cryptoauthlib operations, call add_psa_pubkey_prefix(). */
129129
static uint8_t *pubkey_for_driver(uint8_t *data)
130130
{
131131
return &data[1];
132132
}
133133

134-
static void pubkey_for_psa(uint8_t *data)
134+
static void add_psa_pubkey_prefix(uint8_t *data)
135135
{
136136
data[0] = 0x4;
137137
}
@@ -174,7 +174,7 @@ static psa_status_t atecc608a_export_public_key(psa_drv_se_context_t *drv_contex
174174
ASSERT_SUCCESS_PSA(atecc608a_init());
175175

176176
ASSERT_SUCCESS(atcab_get_pubkey(slot, pubkey_for_driver(p_data)));
177-
pubkey_for_psa(p_data);
177+
add_psa_pubkey_prefix(p_data);
178178

179179
*p_data_length = key_data_len;
180180

@@ -265,7 +265,7 @@ static psa_status_t atecc608a_generate_key(
265265

266266
if (pubkey != NULL) {
267267
ASSERT_SUCCESS(atcab_genkey(key_id, pubkey_for_driver(pubkey)));
268-
pubkey_for_psa(pubkey);
268+
add_psa_pubkey_prefix(pubkey);
269269
} else {
270270
ASSERT_SUCCESS(atcab_genkey(key_id, NULL));
271271
}

0 commit comments

Comments
 (0)