Skip to content

Commit

Permalink
[crypto] Fix initialization of psa key attributes
Browse files Browse the repository at this point in the history
psa_key_attributes_t has to be initialized with PSA_KEY_ATTRIBUTES_INIT.

Signed-off-by: Adrian Gielniewski <[email protected]>
  • Loading branch information
adigie committed Jan 28, 2025
1 parent b082219 commit f0508a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crypto/PSASessionKeystore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ void PSASessionKeystore::DestroyKey(HkdfKeyHandle & key)
CHIP_ERROR PSASessionKeystore::PersistICDKey(Symmetric128BitsKeyHandle & key)
{
CHIP_ERROR err;
psa_key_id_t newKeyId = PSA_KEY_ID_NULL;
psa_key_attributes_t attrs;
psa_key_id_t newKeyId = PSA_KEY_ID_NULL;
psa_key_attributes_t attrs = PSA_KEY_ATTRIBUTES_INIT;

psa_get_key_attributes(key.As<psa_key_id_t>(), &attrs);

Expand Down

0 comments on commit f0508a6

Please sign in to comment.