diff --git a/security_lite/huks/liteos_a_adapter/hks_safe_cipher_key_test.cpp b/security_lite/huks/liteos_a_adapter/hks_safe_cipher_key_test.cpp index e1bb10d82a0516bd8296e9717bc380f41a27dbb9..f1ab4ef3b5bfb519e352cb6d66b9e3a53b8b5ce7 100644 --- a/security_lite/huks/liteos_a_adapter/hks_safe_cipher_key_test.cpp +++ b/security_lite/huks/liteos_a_adapter/hks_safe_cipher_key_test.cpp @@ -22,6 +22,7 @@ #include "hks_test_curve25519.h" #include "hks_test_file_operator.h" #include "hks_test_mem.h" +#include #include "securec.h" @@ -85,8 +86,8 @@ HWTEST_F(HksSafeCipherKeyTest, HksSafeCipherKeyTest001, TestSize.Level1) struct HksBlob X25519PubKey1 = { .size = HKS_CURVE25519_KEY_SIZE_256, .data = nullptr}; struct HksBlob X25519PubKey2 = { .size = HKS_CURVE25519_KEY_SIZE_256, .data = nullptr}; - X25519PubKey1.data = (uint8_t *)HksMalloc(X25519PubKey1.size); - X25519PubKey2.data = (uint8_t *)HksMalloc(X25519PubKey2.size); + X25519PubKey1.data = (uint8_t *)malloc(X25519PubKey1.size); + X25519PubKey2.data = (uint8_t *)malloc(X25519PubKey2.size); ret = HksExportPublicKey(&newAliasOne, null, &X25519PubKey1); EXPECT_EQ(ret, 0)<<"export alies1 fail";