diff --git a/security_lite/huks/liteos_m_adapter/BUILD.gn b/security_lite/huks/liteos_m_adapter/BUILD.gn index aa69dff8f6b475c63e004efd6b8eb44545a40755..10ecf4ed60d56ab3cdbaf5f48d4fb2373c34022b 100644 --- a/security_lite/huks/liteos_m_adapter/BUILD.gn +++ b/security_lite/huks/liteos_m_adapter/BUILD.gn @@ -38,6 +38,7 @@ hctest_suite("ActsHuksHalFunctionTest") { ] include_dirs = [ "//base/security/huks/interfaces/innerkits/huks_standard/main/include", + "//base/iot_hardware/peripheral/interfaces/kits", "../common/include", ] 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 90d29fd957c2bc6f42966c840b018b68ff2b3df1..300681b846fdd03e93b8ccf94b4b8f41b20ce6d6 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 +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "securec.h" @@ -48,7 +48,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksAesTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -72,7 +72,7 @@ static BOOL HksAesTestSetUp() static BOOL HksAesTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 86d3b1e9bffa39fc5843a26cd88782dc1c41aa1e..db6716957f0c6a59a9aaf82bb62b24741a18d417 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_agreement_test.h" #include "hks_api.h" #include "hks_param.h" @@ -57,7 +57,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksAgreementTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -82,7 +82,7 @@ static BOOL HksAgreementTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 3b07c0de77e17bccc060aa651c6865e222dfadc6..84cb8483a16bff1349982a3d76b021f6c95ff958 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_bn_exp_mod_test.h" #include "hks_api.h" #include "hks_param.h" @@ -52,7 +52,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksBnExpModTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -76,7 +76,7 @@ static BOOL HksBnExpModTestSetUp() static BOOL HksBnExpModTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 a030db1220114010573e265f67eee7f8cd07d654..5e33dd7fb36532f032356cae09552f9a4d51199c 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_cipher.h" @@ -57,7 +57,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksCipherTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -81,7 +81,7 @@ static BOOL HksCipherTestSetUp() static BOOL HksCipherTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 861f9ca2369611b16f546314f84ab34a63050ff5..61b87bd67ddffdd0e5f95aa1ca68d37880f0eb79 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_curve25519.h" @@ -56,7 +56,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksCurve25519TestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -80,7 +80,7 @@ static BOOL HksCurve25519TestSetUp() static BOOL HksCurve25519TestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 1c126bc0c6e303ebca16f5df27bb5869df99f67f..9b1cbce52b269d5190966f7c6b5865e5228852e4 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_delete_test.h" #include "hks_api.h" #include "hks_param.h" @@ -82,7 +82,7 @@ static void ExecHksDeleteTest001(void const *argument) static BOOL HksDeleteTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -106,7 +106,7 @@ static BOOL HksDeleteTestSetUp() static BOOL HksDeleteTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 dc83ad40ceaa52cdde7b30a17cd7c62d0ab4b573..b77d55437ce9b5271ea20a12aa91cc0c46547254 100644 --- a/security_lite/huks/liteos_m_adapter/hks_derive_test.c +++ b/security_lite/huks/liteos_m_adapter/hks_derive_test.c @@ -12,7 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "hi_watchdog.h" + +#include "iot_watchdog.h" #include #include "hks_derive_test.h" @@ -55,7 +56,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksDeriveTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -79,7 +80,7 @@ static BOOL HksDeriveTestSetUp() static BOOL HksDeriveTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 8cfce6f21f30c8376e7192ecc5f8fcbce23b69e9..39f15377e3a2fb0d85ad7c230c41a4d239f73548 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_exist_test.h" #include "hks_param.h" @@ -89,7 +89,7 @@ static void ExecHksExistTest001(void const *argument) static BOOL HksExistTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -113,7 +113,7 @@ static BOOL HksExistTestSetUp() static BOOL HksExistTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 bfddd904abfe10ce7cc747c4379f0d744b8eb81e..c7581b254623e583383385fa8e575a0ad4051b7f 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -56,7 +56,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksGenerateKeyTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -80,7 +80,7 @@ static BOOL HksGenerateKeyTestSetUp() static BOOL HksGenerateKeyTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 f45c5b134c2bd2d6693dfb7d16b7e36ba1d709ed..cf00fada60f4bf7b256a9d8a722011fed47ac43b 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -54,7 +54,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksGenerateRandomTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -78,7 +78,7 @@ static BOOL HksGenerateRandomTestSetUp() static BOOL HksGenerateRandomTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 5ea269aa8f95a531da9a2ea8432efc2c626e68c5..558e045c86bda32cffae30061ddc2409593bcc8c 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -58,7 +58,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksHashTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -82,7 +82,7 @@ static BOOL HksHashTestSetUp() static BOOL HksHashTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 4977bdc76ddb5463a4dacf26aba714159b299b98..2eaaad9065dbc98b132a91fe32308cd2ddee0a90 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -79,7 +79,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksMacTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -103,7 +103,7 @@ static BOOL HksMacTestSetUp() static BOOL HksMacTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 8662d5e23511be85ed63844e9a609c3b87a60893..e346989f5cc23c04055251ede0ac5279f4ec2c3e 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 @@ -15,11 +15,10 @@ #ifndef _CUT_AUTHENTICATE_ - #include "hks_modify_key_test.h" #include -#include "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -108,7 +107,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksModifyKeyTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -137,7 +136,7 @@ static BOOL HksModifyKeyTestTearDown() { LiteTestPrint("tearDown\n"); HksTestRemoveFile(); - hi_watchdog_enable(); + 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 2c404615c2767779a73437acaa8391709bf600fc..c6888abd8a01e4fd6d575e8c6cd09000bf3482e9 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_type.h" @@ -53,7 +53,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksOthersTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -77,7 +77,7 @@ static BOOL HksOthersTestSetUp() static BOOL HksOthersTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 e4e52abb0a10757ac3015a2abe37978d7690bdcb..7044e62669ef0f3aaaa5a81d683b214838f0a524 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_curve25519.h" @@ -58,7 +58,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksSafeCipherKeyTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -83,7 +83,7 @@ static BOOL HksSafeCipherKeyTestSetUp() static BOOL HksSafeCipherKeyTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + 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 8b9d0e48d4651f653c3d703362902c2f0e2d99f4..a68eafab73267689b7cb2e5b54e8d08b57bf4099 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 "hi_watchdog.h" +#include "iot_watchdog.h" #include "hks_api.h" #include "hks_param.h" #include "hks_test_api_performance.h" @@ -62,7 +62,7 @@ static void ExecHksInitialize(void const *argument) static BOOL HksSafeCompareKeyTestSetUp() { LiteTestPrint("setup\n"); - hi_watchdog_disable(); + IoTWatchDogDisable(); osThreadId_t id; osThreadAttr_t attr; g_setPriority = osPriorityAboveNormal6; @@ -86,7 +86,7 @@ static BOOL HksSafeCompareKeyTestSetUp() static BOOL HksSafeCompareKeyTestTearDown() { LiteTestPrint("tearDown\n"); - hi_watchdog_enable(); + IoTWatchDogEnable(); return TRUE; }