Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
64d9cb59
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
64d9cb59
编写于
4月 16, 2021
作者:
A
aaronwangjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix failed testcases
Change-Id: I1fe6d28cafd2d1bc5ba0038dd7ba33fd969a542e
上级
a9ec2eeb
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
20 addition
and
6 deletion
+20
-6
security_lite/datahuks_hal/BUILD.gn
security_lite/datahuks_hal/BUILD.gn
+4
-1
security_lite/datahuks_hal/src/security_data_huks_export_hash_random_test.c
...huks_hal/src/security_data_huks_export_hash_random_test.c
+4
-2
security_lite/datahuks_hal/src/security_data_huks_gen_del_test.c
...y_lite/datahuks_hal/src/security_data_huks_gen_del_test.c
+10
-1
security_lite/datahuks_hal/src/security_data_huks_sign_verify_test.c
...te/datahuks_hal/src/security_data_huks_sign_verify_test.c
+2
-2
未找到文件。
security_lite/datahuks_hal/BUILD.gn
浏览文件 @
64d9cb59
...
...
@@ -12,6 +12,7 @@
# limitations under the License.
import("//test/xts/tools/lite/build/suite_lite.gni")
import("//base/security/huks/build/config.gni")
hctest_suite("ActsSecurityDataTest") {
suite_name = "acts"
...
...
@@ -22,7 +23,9 @@ hctest_suite("ActsSecurityDataTest") {
"src/security_data_huks_gen_del_test.c",
"src/security_data_huks_sign_verify_test.c",
]
if (disable_authenticate == true) {
defines = [ "_CUT_AUTHENTICATE_" ]
}
include_dirs = [
"src",
"//base/security/huks/interfaces/innerkits/huks_lite/",
...
...
security_lite/datahuks_hal/src/security_data_huks_export_hash_random_test.c
浏览文件 @
64d9cb59
...
...
@@ -53,7 +53,7 @@ static BOOL SecurityDataHuksExportHashRandomHmacTestSuiteTearDown(void)
printf
(
"-++++++++++++++++++++++++++++++++++++++++++++-
\n
"
);
return
TRUE
;
}
#ifndef _CUT_AUTHENTICATE_
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Export Public key
// begin++++++++++++++++++++++++++++++++++++++++++++++1000-1090
...
...
@@ -326,7 +326,9 @@ securityDataExportPublicKey1090, Function | MediumTest | Level2)
TEST_ASSERT_EQUAL_INT
(
NUM1010
,
status
);
HksBlobDestroyT1
(
&
publicKey1
);
}
#endif
#ifndef _CUT_AUTHENTICATE_
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Export Public key
// end++++++++++++++++++++++++++++++++++++++++++++++++1000-1090
...
...
@@ -545,7 +547,7 @@ LITE_TEST_CASE(SecurityDataHuksExportHashRandomHmacTestSuite, securityDataHash11
HksBlobDestroyT1
(
&
hash
);
TEST_ASSERT_EQUAL_INT
(
NUM1007
,
status
);
}
#endif
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Hash
// end+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++1100-1190
...
...
security_lite/datahuks_hal/src/security_data_huks_gen_del_test.c
浏览文件 @
64d9cb59
...
...
@@ -54,6 +54,7 @@ void HksBlobDestroyT1(struct hks_blob *blob)
}
int
TestSecShuksGenerateKeyNormal
(
void
)
{
#ifndef _CUT_AUTHENTICATE_
char
testFileName
[]
=
"keyalias1"
;
char
testFileName1
[]
=
"key_auth_id1"
;
struct
hks_blob
keyAlias
;
...
...
@@ -72,10 +73,12 @@ int TestSecShuksGenerateKeyNormal(void)
keyParam
.
key_pad
=
0
;
int32_t
status
=
hks_generate_key
(
&
keyAlias
,
&
keyParam
);
TEST_ASSERT_EQUAL_INT
(
0
,
status
);
#endif
return
0
;
}
int
TestSecShuksDeleteKeyNormal
(
void
)
{
#ifndef _CUT_AUTHENTICATE_
char
testFileName
[]
=
"keyalias1"
;
struct
hks_blob
keyAlias
=
{
0
};
...
...
@@ -85,12 +88,15 @@ int TestSecShuksDeleteKeyNormal(void)
int32_t
status
=
hks_delete_key
(
&
keyAlias
);
TEST_ASSERT_EQUAL_INT
(
0
,
status
);
#endif
return
0
;
}
int
TestSecShuksExportPublicNormal
(
struct
hks_blob
*
keyAlias
,
struct
hks_blob
*
publicKey1
)
{
#ifndef _CUT_AUTHENTICATE_
int32_t
status
=
hks_export_public_key
(
keyAlias
,
publicKey1
);
TEST_ASSERT_EQUAL_INT
(
0
,
status
);
#endif
return
0
;
}
void
BuildBlobData
(
struct
hks_blob
*
param
,
const
char
*
str
,
uint8_t
type
,
uint32_t
size
,
uint8_t
isDataNull
)
...
...
@@ -171,6 +177,7 @@ void TestInitKeyParam1(struct hks_key_param *keyParam, uint32_t keyType, uint32_
int
TestSecShuksImportPublicNormal
(
void
)
{
#ifndef _CUT_AUTHENTICATE_
char
testFileName
[]
=
"keyalias1"
;
struct
hks_key_param
keyParam1
=
{
0
};
...
...
@@ -196,6 +203,7 @@ int TestSecShuksImportPublicNormal(void)
TEST_ASSERT_EQUAL_INT
(
0
,
status
);
HksBlobDestroyT1
(
&
publicKey1
);
#endif
return
0
;
}
...
...
@@ -240,6 +248,7 @@ static BOOL SecurityDataHuksGenDelTestSuiteTearDown(void)
* @tc.name : Generate key, normal input parameters keyAlias and keyParam
* @tc.desc : [C- SECURITY -1400]
*/
#ifndef _CUT_AUTHENTICATE_
LITE_TEST_CASE
(
SecurityDataHuksGenDelTestSuite
,
securityDataGenerateKey0000
,
Function
|
MediumTest
|
Level1
)
{
char
testFileName
[]
=
"keyalias1"
;
...
...
@@ -831,5 +840,5 @@ LITE_TEST_CASE(SecurityDataHuksGenDelTestSuite, securityDataDeleteKey0190, Funct
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Delete key
// end+++++++++++++++++++++++++++++++++++++++++++++++++++++++0130-0190
#endif
RUN_TEST_SUITE
(
SecurityDataHuksGenDelTestSuite
);
security_lite/datahuks_hal/src/security_data_huks_sign_verify_test.c
浏览文件 @
64d9cb59
...
...
@@ -53,7 +53,7 @@ static BOOL SecurityDataHuksSignVerifyTestSuiteTearDown(void)
printf
(
"-++++++++++++++++++++++++++++++++++++++++++++-
\n
"
);
return
TRUE
;
}
#ifndef _CUT_AUTHENTICATE_
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Sign key
// begin+++++++++++++++++++++++++++++++++++++++++++++++++++++++0200-0340
...
...
@@ -1267,7 +1267,7 @@ LITE_TEST_CASE(SecurityDataHuksSignVerifyTestSuite, securityDataAsymmetricVerify
status
=
hks_asymmetric_verify
(
&
keyAlias
,
&
keyParam
,
&
hash
,
&
signature
);
TEST_ASSERT_EQUAL_INT
(
NUM135
,
status
);
}
#endif
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Verify key
// end+++++++++++++++++++++++++++++++++++++++++++++++++++++++0350-0510
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录