projects
/
platform
/
core
/
security
/
trusted
/
key-manager-ta.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1371b31
)
Translate invalid AES key size error
33/299133/1
author
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Wed, 20 Sep 2023 10:00:20 +0000
(12:00 +0200)
committer
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Wed, 20 Sep 2023 10:00:20 +0000
(12:00 +0200)
According to GP API when incorrect key size is given the
TEE_ERROR_NOT_SUPPORTED is returned but key-manager expects
TEE_ERROR_BAD_PARAMETERS in such case.
Change-Id: I06a61680a5d134eb92a2b0b4ee6f80580c14c023
ta/src/cmd_exec.c
patch
|
blob
|
history
diff --git
a/ta/src/cmd_exec.c
b/ta/src/cmd_exec.c
index bb0847154268125052357f1e7e00fad1368fadd1..f7dac3bfada560e28295ea6b70e7897bc639b602 100644
(file)
--- a/
ta/src/cmd_exec.c
+++ b/
ta/src/cmd_exec.c
@@
-1602,6
+1602,8
@@
TEE_Result KM_ExecCmdImportWrappedKey(TEE_Param param[4])
ret = KM_CreateKey(tee_enc_key_type, ekey_data.data_size * 8, ekey_data.data, &key);
}
if (ret != TEE_SUCCESS) {
+ if (ret == TEE_ERROR_NOT_SUPPORTED)
+ ret = TEE_ERROR_BAD_PARAMETERS;
LOG("Failed to create key");
goto clean;
}