diff --git a/security_lite/huks/common/hks_test_file_operator.c b/security_lite/huks/common/hks_test_file_operator.c index b2f8334d876b652e82635cfdf1e16114149cf00e..178ebc6a25893877a6bbf80522297ae0ce0ce4d5 100644 --- a/security_lite/huks/common/hks_test_file_operator.c +++ b/security_lite/huks/common/hks_test_file_operator.c @@ -104,7 +104,6 @@ static uint32_t FileRead(const char *fileName, uint32_t offset, uint8_t *buf, ui } char filePath[PATH_MAX + 1] = {0}; - (void)realpath(fileName, filePath); if (strstr(filePath, "../") != NULL) { HKS_TEST_LOG_E("invalid filePath, path %s", filePath); return 0; @@ -148,7 +147,6 @@ static int32_t FileWrite(const char *fileName, uint32_t offset, const uint8_t *b if (memcpy_s(filePath, sizeof(filePath) - 1, fileName, strlen(fileName)) != EOK) { return HKS_ERROR_BAD_STATE; } - (void)realpath(fileName, filePath); if (strstr(filePath, "../") != NULL) { HKS_TEST_LOG_E("invalid filePath, path %s", filePath); return HKS_ERROR_INVALID_KEY_FILE; @@ -182,22 +180,6 @@ static int32_t FileWrite(const char *fileName, uint32_t offset, const uint8_t *b return HKS_SUCCESS; } -int32_t HksIsFileExist(const char *path, const char *fileName) -{ - if (fileName == NULL) { - return HKS_ERROR_NULL_POINTER; - } - - char *fullFileName = NULL; - int32_t ret = GetFullFileName(path, fileName, &fullFileName); - if (ret != HKS_SUCCESS) { - return ret; - } - - ret = IsFileExist(fullFileName); - HksTestFree(fullFileName); - return ret; -} #else static uint32_t FileRead(const char *fileName, uint32_t offset, uint8_t *buf, uint32_t len) { diff --git a/security_lite/huks/liteos_m_adapter/hks_aes_test.c b/security_lite/huks/liteos_m_adapter/hks_aes_test.c index 300681b846fdd03e93b8ccf94b4b8f41b20ce6d6..dc110242f1598cc401df605425bd999d55b76d7f 100644 --- a/security_lite/huks/liteos_m_adapter/hks_aes_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_aes_test.c @@ -14,7 +14,7 @@ */ #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "securec.h" @@ -48,7 +48,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksAesTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -72,7 +71,6 @@ static BOOL HksAesTestSetUp() static BOOL HksAesTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_agreement_test.c b/security_lite/huks/liteos_m_adapter/hks_agreement_test.c index db6716957f0c6a59a9aaf82bb62b24741a18d417..9b9f8d9b96dfa8cee7447640c9862b0fcff2d638 100644 --- a/security_lite/huks/liteos_m_adapter/hks_agreement_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_agreement_test.c @@ -14,7 +14,7 @@ */ #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_agreement_test.h" #include "hks_api.h" #include "hks_param.h" @@ -57,7 +57,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksAgreementTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -81,8 +80,6 @@ static BOOL HksAgreementTestSetUp() static BOOL HksAgreementTestTearDown() { LiteTestPrint("tearDown\n"); - - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_bn_exp_mod_test.c b/security_lite/huks/liteos_m_adapter/hks_bn_exp_mod_test.c index 84cb8483a16bff1349982a3d76b021f6c95ff958..98bcd7a1460565fbcdde1010780a03ecbdfcd8dd 100644 --- a/security_lite/huks/liteos_m_adapter/hks_bn_exp_mod_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_bn_exp_mod_test.c @@ -14,7 +14,7 @@ */ #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_bn_exp_mod_test.h" #include "hks_api.h" #include "hks_param.h" @@ -52,7 +52,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksBnExpModTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -76,7 +75,6 @@ static BOOL HksBnExpModTestSetUp() static BOOL HksBnExpModTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_cipher_test.c b/security_lite/huks/liteos_m_adapter/hks_cipher_test.c index 5e33dd7fb36532f032356cae09552f9a4d51199c..8d73f9522f66d2f7408243cf3d40e51ffecb74a5 100644 --- a/security_lite/huks/liteos_m_adapter/hks_cipher_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_cipher_test.c @@ -16,7 +16,7 @@ #include "hks_cipher_test.h" #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_cipher.h" @@ -57,7 +57,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksCipherTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -81,7 +80,6 @@ static BOOL HksCipherTestSetUp() static BOOL HksCipherTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_curve25519_test.c b/security_lite/huks/liteos_m_adapter/hks_curve25519_test.c index 61b87bd67ddffdd0e5f95aa1ca68d37880f0eb79..c1051abc5b69d49ad8bbd2e4d400bbb6efe9c10e 100644 --- a/security_lite/huks/liteos_m_adapter/hks_curve25519_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_curve25519_test.c @@ -19,7 +19,7 @@ #include "cmsis_os2.h" #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_curve25519.h" @@ -56,7 +56,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksCurve25519TestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -80,7 +79,6 @@ static BOOL HksCurve25519TestSetUp() static BOOL HksCurve25519TestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_delete_test.c b/security_lite/huks/liteos_m_adapter/hks_delete_test.c index 9b1cbce52b269d5190966f7c6b5865e5228852e4..3aaadc411a5ac79ca20a2fbd96415492269cb4bc 100644 --- a/security_lite/huks/liteos_m_adapter/hks_delete_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_delete_test.c @@ -16,7 +16,7 @@ #ifndef _CUT_AUTHENTICATE_ #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_delete_test.h" #include "hks_api.h" #include "hks_param.h" @@ -82,7 +82,6 @@ static void ExecHksDeleteTest001(void const *argument) static BOOL HksDeleteTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -106,7 +105,6 @@ static BOOL HksDeleteTestSetUp() static BOOL HksDeleteTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_derive_test.c b/security_lite/huks/liteos_m_adapter/hks_derive_test.c index b77d55437ce9b5271ea20a12aa91cc0c46547254..af2fca799cd25fb792cbb3e0112c6251d07f2ca4 100644 --- a/security_lite/huks/liteos_m_adapter/hks_derive_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_derive_test.c @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "iot_watchdog.h" + #include #include "hks_derive_test.h" @@ -56,7 +56,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksDeriveTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -80,7 +79,6 @@ static BOOL HksDeriveTestSetUp() static BOOL HksDeriveTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_exist_test.c b/security_lite/huks/liteos_m_adapter/hks_exist_test.c index 5d60156e97203c26fd58245c8655818c9e979859..ac981aa9af2b25d284d85dc9f861e10a6b9cfbd3 100644 --- a/security_lite/huks/liteos_m_adapter/hks_exist_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_exist_test.c @@ -16,7 +16,7 @@ #ifndef _CUT_AUTHENTICATE_ #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_exist_test.h" #include "hks_param.h" @@ -91,7 +91,6 @@ static void ExecHksExistTest001(void const *argument) static BOOL HksExistTestSetUp(void) { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -118,7 +117,6 @@ static BOOL HksExistTestSetUp(void) static BOOL HksExistTestTearDown(void) { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_generate_key_test.c b/security_lite/huks/liteos_m_adapter/hks_generate_key_test.c index c7581b254623e583383385fa8e575a0ad4051b7f..7675d495f9648764c7e0e226b28f51fa5ce80ec2 100644 --- a/security_lite/huks/liteos_m_adapter/hks_generate_key_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_generate_key_test.c @@ -18,7 +18,7 @@ #include "hks_generate_key_test.h" #include -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -56,7 +56,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksGenerateKeyTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -80,7 +79,6 @@ static BOOL HksGenerateKeyTestSetUp() static BOOL HksGenerateKeyTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_generate_random_test.c b/security_lite/huks/liteos_m_adapter/hks_generate_random_test.c index cf00fada60f4bf7b256a9d8a722011fed47ac43b..d79bea696dd5fefeedf050325aff17ac9610291e 100644 --- a/security_lite/huks/liteos_m_adapter/hks_generate_random_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_generate_random_test.c @@ -15,7 +15,7 @@ #include "hks_generate_random_test.h" #include "hctest.h" -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -54,7 +54,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksGenerateRandomTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -78,7 +77,6 @@ static BOOL HksGenerateRandomTestSetUp() static BOOL HksGenerateRandomTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_hash_test.c b/security_lite/huks/liteos_m_adapter/hks_hash_test.c index 558e045c86bda32cffae30061ddc2409593bcc8c..2e4fc76381772c48e65116675357d825f8c9e1c4 100644 --- a/security_lite/huks/liteos_m_adapter/hks_hash_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_hash_test.c @@ -16,7 +16,7 @@ #ifndef _CUT_AUTHENTICATE_ #include -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -58,7 +58,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksHashTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -82,7 +81,6 @@ static BOOL HksHashTestSetUp() static BOOL HksHashTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_mac_test.c b/security_lite/huks/liteos_m_adapter/hks_mac_test.c index 2eaaad9065dbc98b132a91fe32308cd2ddee0a90..199c7273e1cbc11e8ac78e13036988efab008f1d 100644 --- a/security_lite/huks/liteos_m_adapter/hks_mac_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_mac_test.c @@ -16,7 +16,7 @@ #include "hks_mac_test.h" #include -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -79,7 +79,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksMacTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -103,7 +102,6 @@ static BOOL HksMacTestSetUp() static BOOL HksMacTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_modify_key_test.c b/security_lite/huks/liteos_m_adapter/hks_modify_key_test.c index e346989f5cc23c04055251ede0ac5279f4ec2c3e..f91657283483d8f8e4f062aa7660931484abe124 100644 --- a/security_lite/huks/liteos_m_adapter/hks_modify_key_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_modify_key_test.c @@ -18,7 +18,7 @@ #include "hks_modify_key_test.h" #include -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -107,7 +107,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksModifyKeyTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -136,7 +135,6 @@ static BOOL HksModifyKeyTestTearDown() { LiteTestPrint("tearDown\n"); HksTestRemoveFile(); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_others_test.c b/security_lite/huks/liteos_m_adapter/hks_others_test.c index c6888abd8a01e4fd6d575e8c6cd09000bf3482e9..a807208e024df3fdc23725784fe899ab8d73f177 100644 --- a/security_lite/huks/liteos_m_adapter/hks_others_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_others_test.c @@ -18,7 +18,7 @@ #include "hks_others_test.h" #include -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_type.h" @@ -53,7 +53,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksOthersTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -77,7 +76,6 @@ static BOOL HksOthersTestSetUp() static BOOL HksOthersTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_safe_cipher_key_test.c b/security_lite/huks/liteos_m_adapter/hks_safe_cipher_key_test.c index 5e8a6858deb599772b6c2d25fe2b439622ae06a8..ce7bc4a682c01a3e247240e872f65fb140912277 100644 --- a/security_lite/huks/liteos_m_adapter/hks_safe_cipher_key_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_safe_cipher_key_test.c @@ -19,7 +19,7 @@ #include "hks_safe_cipher_key_test.h" #include -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_curve25519.h" @@ -58,7 +58,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksSafeCipherKeyTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -83,7 +82,6 @@ static BOOL HksSafeCipherKeyTestSetUp() static BOOL HksSafeCipherKeyTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; } diff --git a/security_lite/huks/liteos_m_adapter/hks_safe_compare_key_test.c b/security_lite/huks/liteos_m_adapter/hks_safe_compare_key_test.c index d445da0f941c935d2dc851fa8ef5d350d40b83d4..6e721f421da7ef932f5059c7a5ac5176dabfabe1 100644 --- a/security_lite/huks/liteos_m_adapter/hks_safe_compare_key_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_safe_compare_key_test.c @@ -18,7 +18,7 @@ #include "hks_safe_compare_key_test.h" #include -#include "iot_watchdog.h" + #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -62,7 +62,6 @@ static void ExecHksInitialize(void const *argument) static BOOL HksSafeCompareKeyTestSetUp() { LiteTestPrint("setup\n"); - IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -86,7 +85,6 @@ static BOOL HksSafeCompareKeyTestSetUp() static BOOL HksSafeCompareKeyTestTearDown() { LiteTestPrint("tearDown\n"); - IoTWatchDogEnable(); return TRUE; }