Skip to content

Commit e28f439

Browse files
authored
[crypto] Fix initialization of psa key attributes (#37255)
psa_key_attributes_t has to be initialized with PSA_KEY_ATTRIBUTES_INIT. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@gmail.com>
1 parent e0792a4 commit e28f439

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crypto/PSASessionKeystore.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ void PSASessionKeystore::DestroyKey(HkdfKeyHandle & key)
190190
CHIP_ERROR PSASessionKeystore::PersistICDKey(Symmetric128BitsKeyHandle & key)
191191
{
192192
CHIP_ERROR err;
193-
psa_key_id_t newKeyId = PSA_KEY_ID_NULL;
194-
psa_key_attributes_t attrs;
193+
psa_key_id_t newKeyId = PSA_KEY_ID_NULL;
194+
psa_key_attributes_t attrs = PSA_KEY_ATTRIBUTES_INIT;
195195

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

0 commit comments

Comments
 (0)