Fix of error macros

pull/6642/head
Yossi Levy 2018-05-14 13:52:20 +03:00
parent 9df32d1f00
commit 73d1c8df93
2 changed files with 5 additions and 5 deletions

View File

@ -122,7 +122,7 @@ int DeviceKey::write_key_to_nvstore(uint32_t *input, size_t isize)
}
if (NVSTORE_SUCCESS != ret) {
return DEVICEKEY_NVSTORE_UNPREDICTABLE_ERROR;
return DEVICEKEY_NVSTORE_UNPREDICTED_ERROR;
}
return DEVICEKEY_SUCCESS;
@ -147,7 +147,7 @@ int DeviceKey::read_key_from_nvstore(uint32_t *output, size_t& size)
}
if (NVSTORE_SUCCESS != nvStatus) {
return DEVICEKEY_NVSTORE_UNPREDICTABLE_ERROR;
return DEVICEKEY_NVSTORE_UNPREDICTED_ERROR;
}
size = out_size;
@ -242,7 +242,7 @@ int DeviceKey::generate_key_by_trng(uint32_t *output, size_t& size)
memset(output, 0, size);
if (DEVICE_KEY_16BYTE > size) {
return DEVICEKEY_BUFFER_TO_SMALL;
return DEVICEKEY_BUFFER_TOO_SMALL;
} else if (DEVICE_KEY_16BYTE <= size && DEVICE_KEY_32BYTE > size) {
size = DEVICE_KEY_16BYTE;
} else {

View File

@ -36,9 +36,9 @@ enum DeviceKeyStatus {
DEVICEKEY_ALREADY_EXIST = -4,
DEVICEKEY_NOT_FOUND = -5,
DEVICEKEY_READ_FAILED = -6,
DEVICEKEY_NVSTORE_UNPREDICTABLE_ERROR = -7,
DEVICEKEY_NVSTORE_UNPREDICTED_ERROR = -7,
DEVICEKEY_ERR_CMAC_GENERIC_FAILURE = -8,
DEVICEKEY_BUFFER_TO_SMALL = -9,
DEVICEKEY_BUFFER_TOO_SMALL = -9,
DEVICEKEY_NO_KEY_INJECTED = -10,
DEVICEKEY_INVALID_PARAM = -11,
DEVICEKEY_TRNG_ERROR = -12,