未验证 提交 f2c2d213 编写于 作者: 伞木希美 提交者: Gitee

update security_lite/huks/liteos_a_adapter/hks_safe_cipher_key_test.cpp.

Signed-off-by: N伞木希美 <zhanghanlin9@huawei.com>
上级 7d930096
......@@ -89,16 +89,16 @@ HWTEST_F(HksSafeCipherKeyTest, HksSafeCipherKeyTest001, TestSize.Level1)
X25519PubKey1.data = (uint8_t *)malloc(X25519PubKey1.size);
X25519PubKey2.data = (uint8_t *)malloc(X25519PubKey2.size);
ret = HksExportPublicKey(&newAliasOne, null, &X25519PubKey1);
ret = HksExportPublicKey(&newAliasOne, nullptr, &X25519PubKey1);
EXPECT_EQ(ret, 0)<<"export alies1 fail";
ret = HksExportPublicKey(&newAliasTwo, null, &X25519PubKey1);
ret = HksExportPublicKey(&newAliasTwo, nullptr, &X25519PubKey2);
EXPECT_EQ(ret, 0)<<"export alies2 fail";
ret = memcmp(X25519PubKey1.data, X25519PubKey2.data, HKS_CURVE25519_KEY_SIZE_256);
EXPECT_NE(ret, 0);
ret = HksDeleteKey(&newAliasOne, NULL);
ret = HksDeleteKey(&newAliasOne, nullptr);
EXPECT_EQ(ret, 0);
ret = HksDeleteKey(&newAliasTwo, NULL);
ret = HksDeleteKey(&newAliasTwo, nullptr);
EXPECT_EQ(ret, 0);
}
#endif /* _CUT_AUTHENTICATE_ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册