Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crypto] Fix initialization of psa key attributes #540

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

adigie
Copy link
Member

@adigie adigie commented Jan 28, 2025

psa_key_attributes_t has to be initialized with PSA_KEY_ATTRIBUTES_INIT.

psa_key_attributes_t has to be initialized with PSA_KEY_ATTRIBUTES_INIT.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@gmail.com>
@rlubos rlubos merged commit c63ff3f into nrfconnect:master Jan 28, 2025
8 checks passed
@LuDuda
Copy link
Collaborator

LuDuda commented Jan 28, 2025

@adigie what are the consequences of previous behaviour?

@Damian-Nordic
Copy link
Contributor

This seems unnecessary according to https://arm-software.github.io/psa-api/crypto/1.1/api/keys/attributes.html#c.psa_get_key_attributes

This function first resets the attribute object as with psa_reset_key_attributes(). It then copies the attributes of the given key into the given attribute object.

@adigie
Copy link
Member Author

adigie commented Jan 29, 2025

It freed some random address in the upstream tests on 2.7.0, because of:
https://github.com/nrfconnect/sdk-mbedtls/blob/72868c6f1421afa92cba9f6fe6d1a3f108c174b7/library/psa_crypto_client.c#L19-L19

Now I see that we don't have domain parameters anymore:
https://github.com/nrfconnect/sdk-mbedtls/blob/HEAD/library/psa_crypto_client.c#L19-L19

@adigie adigie deleted the fix-psa branch February 3, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants