mirror of
https://github.com/openharmony/tee_tee_dev_kit.git
synced 2026-08-25 09:09:44 -04:00
no message
Match-id-40f2b307d198611fbfeee6240db8f6c2319366f6
This commit is contained in:
@@ -285,7 +285,7 @@ int64_t open_test(struct drv_data *drv, unsigned long args, uint32_t args_len)
|
||||
|
||||
uint32_t *input = (uint32_t *)(uintptr_t)args;
|
||||
if (*input == UINT32_MAX) {
|
||||
tloge("open test input args is UINT32_MAX, just retrun -1\n");
|
||||
tloge("open test input args is UINT32_MAX, just return -1\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ int64_t open_test(struct drv_data *drv, unsigned long args, uint32_t args_len)
|
||||
|
||||
uint32_t *input = (uint32_t *)(uintptr_t)args;
|
||||
if (*input == UINT32_MAX) {
|
||||
tloge("open test input args is UINT32_MAX, just retrun -1\n");
|
||||
tloge("open test input args is UINT32_MAX, just return -1\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ int64_t open_test(struct drv_data *drv, unsigned long args, uint32_t args_len)
|
||||
|
||||
uint32_t *input = (uint32_t *)(uintptr_t)args;
|
||||
if (*input == UINT32_MAX) {
|
||||
tloge("open test input args is UINT32_MAX, just retrun -1\n");
|
||||
tloge("open test input args is UINT32_MAX, just return -1\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1583,7 +1583,7 @@ int64_t open_test(struct drv_data *drv, unsigned long args, uint32_t args_len)
|
||||
|
||||
uint32_t *input = (uint32_t *)args;
|
||||
if (*input == UINT32_MAX) {
|
||||
tloge("open test input args is UINT32_MAX, just retrun -1\n");
|
||||
tloge("open test input args is UINT32_MAX, just return -1\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ int main(void)
|
||||
printf("AES demo teec open session failed.\n");
|
||||
goto cleanup_1;
|
||||
} else {
|
||||
printf("AES demo teec open session successed.\n");
|
||||
printf("AES demo teec open session succeed.\n");
|
||||
}
|
||||
|
||||
operation.started = 1;
|
||||
@@ -64,14 +64,14 @@ int main(void)
|
||||
printf("AES CBC encrypt and decrypt test failed, result=0x%x, origin=0x%x.\n", result, origin);
|
||||
goto cleanup_2;
|
||||
} else {
|
||||
printf("AES CBC encrypt and decrypt test successed.\n");
|
||||
printf("AES CBC encrypt and decrypt test succeed.\n");
|
||||
}
|
||||
result = TEEC_InvokeCommand(&session, CMD_AES_CCM_ENCRYPT_DECRYPT, &operation, &origin);
|
||||
if (result != TEEC_SUCCESS) {
|
||||
printf("AES CCM encrypt and decrypt test failed, result=0x%x, origin=0x%x.\n", result, origin);
|
||||
goto cleanup_2;
|
||||
} else {
|
||||
printf("AES CCM encrypt and decrypt test successed.\n");
|
||||
printf("AES CCM encrypt and decrypt test succeed.\n");
|
||||
}
|
||||
|
||||
cleanup_2:
|
||||
@@ -79,4 +79,4 @@ cleanup_2:
|
||||
cleanup_1:
|
||||
TEEC_FinalizeContext(&context);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ static TEEC_Result teec_init(void)
|
||||
ret = TEEC_OpenSession(&g_context, &g_session, &g_macDemoUuid,
|
||||
TEEC_LOGIN_IDENTIFY, NULL, &operation, &origin);
|
||||
if (ret != TEEC_SUCCESS) {
|
||||
printf("open session failed: result:%d, orgin: %d\n", (int)ret, origin);
|
||||
printf("open session failed: result:%d, origin: %d\n", (int)ret, origin);
|
||||
TEEC_FinalizeContext(&g_context);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ int main(void)
|
||||
printf("RSA demo teec open session failed.\n");
|
||||
goto cleanup_1;
|
||||
} else {
|
||||
printf("RSA demo teec open session successed.\n");
|
||||
printf("RSA demo teec open session succeed.\n");
|
||||
}
|
||||
|
||||
operation.started = 1;
|
||||
@@ -64,7 +64,7 @@ int main(void)
|
||||
printf("RSA encrypt and decrypt test failed, result=0x%x, origin=0x%x.\n", result, origin);
|
||||
goto cleanup_2;
|
||||
} else {
|
||||
printf("RSA encrypt and decrypt test successed.\n");
|
||||
printf("RSA encrypt and decrypt test succeed.\n");
|
||||
}
|
||||
|
||||
result = TEEC_InvokeCommand(&session, CMD_RSA_SIGN_VERIFY, &operation, &origin);
|
||||
@@ -72,7 +72,7 @@ int main(void)
|
||||
printf("RSA sign and verify test failed, result=0x%x, origin=0x%x.\n", result, origin);
|
||||
goto cleanup_2;
|
||||
} else {
|
||||
printf("RSA signature and verify test successed.\n");
|
||||
printf("RSA signature and verify test succeed.\n");
|
||||
}
|
||||
|
||||
cleanup_2:
|
||||
@@ -80,4 +80,4 @@ cleanup_2:
|
||||
cleanup_1:
|
||||
TEEC_FinalizeContext(&context);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ enum DEMO_AES_CRYPTO_CMD {
|
||||
TEE_Result TA_CreateEntryPoint(void)
|
||||
{
|
||||
TEE_Result ret;
|
||||
tlogd("----- AES TA creat entry point -----\n");
|
||||
tlogd("----- AES TA create entry point -----\n");
|
||||
|
||||
/* When you develop your own CA, you need to change the name to your own path and CA name. */
|
||||
ret = AddCaller_CA_exec("/vendor/bin/aes_demo_ca", 0);
|
||||
|
||||
@@ -147,5 +147,5 @@ void TA_CloseSessionEntryPoint(void* session_context)
|
||||
*/
|
||||
void TA_DestroyEntryPoint(void)
|
||||
{
|
||||
tlogd("---- destory TA ---- ");
|
||||
tlogd("---- destroy TA ---- ");
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ TEE_Result TA_CreateEntryPoint(void)
|
||||
{
|
||||
TEE_Result ret;
|
||||
|
||||
tlogd("----- RSA TA creat entry point -----\n");
|
||||
tlogd("----- RSA TA create entry point -----\n");
|
||||
|
||||
/* When you develop your own CA, you need to change the name to your own path and CA name. */
|
||||
ret = AddCaller_CA_exec("/vendor/bin/rsa_demo_ca", 0);
|
||||
|
||||
@@ -287,5 +287,5 @@ void TA_CloseSessionEntryPoint(void* session_context)
|
||||
|
||||
void TA_DestroyEntryPoint(void)
|
||||
{
|
||||
tlogd("---- destory TA ---- ");
|
||||
tlogd("---- destroy TA ---- ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user