Skip to content

Commit 165719d

Browse files
author
Netanel Gonen
committed
return the new values for key type & size even if function fails
1 parent e03b3b6 commit 165719d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_crypto_partition.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,13 +1076,11 @@ static void psa_key_management_operation(void)
10761076
size_t bits;
10771077
status = psa_get_key_information(psa_key_mng.handle,
10781078
&type, &bits);
1079-
if (status == PSA_SUCCESS) {
1080-
if (msg.out_size[0] >= sizeof(psa_key_type_t))
1081-
psa_write(msg.handle, 0,
1082-
&type, sizeof(psa_key_type_t));
1083-
if (msg.out_size[1] >= sizeof(size_t)) {
1084-
psa_write(msg.handle, 1, &bits, sizeof(size_t));
1085-
}
1079+
if (msg.out_size[0] >= sizeof(psa_key_type_t))
1080+
psa_write(msg.handle, 0,
1081+
&type, sizeof(psa_key_type_t));
1082+
if (msg.out_size[1] >= sizeof(size_t)) {
1083+
psa_write(msg.handle, 1, &bits, sizeof(size_t));
10861084
}
10871085

10881086
break;

0 commit comments

Comments
 (0)