Skip to content

Commit d0021b5

Browse files
orenc17Oren Cohen
authored andcommitted
Fix error codes for psa_attestation_inject_key
1 parent 5677b38 commit d0021b5

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IPC/psa_attest_inject_key.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,5 @@ psa_attestation_inject_key(const uint8_t *key_data,
5151
call_error = psa_call(handle, in_vec, 2, out_vec, 2);
5252

5353
psa_close(handle);
54-
55-
if (call_error < 0) {
56-
call_error = PSA_ERROR_COMMUNICATION_FAILURE;
57-
}
5854
return call_error;
5955
}

components/TARGET_PSA/services/attestation/COMPONENT_SPE/psa_attestation_partition.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static void psa_attest_inject_key(void)
175175
uint32_t bytes_read = 0;
176176

177177
if (msg.in_size[0] != sizeof(psa_key_type_t)) {
178-
status = PSA_ERROR_COMMUNICATION_FAILURE;
178+
status = PSA_ERROR_INVALID_ARGUMENT;
179179
break;
180180
}
181181

0 commit comments

Comments
 (0)