Fix error codes for psa_attestation_inject_key

pull/9996/head
Oren Cohen 2019-03-07 22:31:42 +02:00 committed by Oren Cohen
parent 5677b386af
commit d0021b5de7
2 changed files with 1 additions and 5 deletions

View File

@ -51,9 +51,5 @@ psa_attestation_inject_key(const uint8_t *key_data,
call_error = psa_call(handle, in_vec, 2, out_vec, 2); call_error = psa_call(handle, in_vec, 2, out_vec, 2);
psa_close(handle); psa_close(handle);
if (call_error < 0) {
call_error = PSA_ERROR_COMMUNICATION_FAILURE;
}
return call_error; return call_error;
} }

View File

@ -175,7 +175,7 @@ static void psa_attest_inject_key(void)
uint32_t bytes_read = 0; uint32_t bytes_read = 0;
if (msg.in_size[0] != sizeof(psa_key_type_t)) { if (msg.in_size[0] != sizeof(psa_key_type_t)) {
status = PSA_ERROR_COMMUNICATION_FAILURE; status = PSA_ERROR_INVALID_ARGUMENT;
break; break;
} }