Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
33af1070
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看板
提交
33af1070
编写于
11月 14, 2022
作者:
Z
zhao_zhen_zhou
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
去除冗余/标废弃未使用的tag
Signed-off-by:
N
zhao_zhen_zhou
<
zhaozhenzhou@huawei.com
>
上级
dbdc7417
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
20 deletion
+3
-20
security/huks_napi_BasicTest/src/huks_misc_test.cpp
security/huks_napi_BasicTest/src/huks_misc_test.cpp
+1
-18
security/huks_napi_BasicTest/src/huks_nullptr_test.cpp
security/huks_napi_BasicTest/src/huks_nullptr_test.cpp
+2
-2
未找到文件。
security/huks_napi_BasicTest/src/huks_misc_test.cpp
浏览文件 @
33af1070
...
...
@@ -167,7 +167,6 @@ namespace Unittest::HuksMisc
ASSERT_EQ
((
uint32_t
)
OH_HUKS_CHALLENGE_POS_2
==
2
,
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_CHALLENGE_POS_3
==
3
,
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_SECURE_SIGN_WITH_AUTHINFO
==
1
,
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_INVALID
==
(
OH_HUKS_TAG_TYPE_INVALID
|
0
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ALGORITHM
==
(
OH_HUKS_TAG_TYPE_UINT
|
1
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_PURPOSE
==
(
OH_HUKS_TAG_TYPE_UINT
|
2
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_KEY_SIZE
==
(
OH_HUKS_TAG_TYPE_UINT
|
3
),
true
);
...
...
@@ -180,12 +179,8 @@ namespace Unittest::HuksMisc
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_IV
==
(
OH_HUKS_TAG_TYPE_BYTES
|
10
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_INFO
==
(
OH_HUKS_TAG_TYPE_BYTES
|
11
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_SALT
==
(
OH_HUKS_TAG_TYPE_BYTES
|
12
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_PWD
==
(
OH_HUKS_TAG_TYPE_BYTES
|
13
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ITERATION
==
(
OH_HUKS_TAG_TYPE_UINT
|
14
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_KEY_GENERATE_TYPE
==
(
OH_HUKS_TAG_TYPE_UINT
|
15
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_DERIVE_MAIN_KEY
==
(
OH_HUKS_TAG_TYPE_BYTES
|
16
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_DERIVE_FACTOR
==
(
OH_HUKS_TAG_TYPE_BYTES
|
17
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_DERIVE_ALG
==
(
OH_HUKS_TAG_TYPE_UINT
|
18
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_AGREE_ALG
==
(
OH_HUKS_TAG_TYPE_UINT
|
19
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS
==
(
OH_HUKS_TAG_TYPE_BOOL
|
20
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS
==
(
OH_HUKS_TAG_TYPE_BYTES
|
21
),
true
);
...
...
@@ -207,17 +202,7 @@ namespace Unittest::HuksMisc
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_CHALLENGE
==
(
OH_HUKS_TAG_TYPE_BYTES
|
501
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_APPLICATION_ID
==
(
OH_HUKS_TAG_TYPE_BYTES
|
502
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_BRAND
==
(
OH_HUKS_TAG_TYPE_BYTES
|
503
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_DEVICE
==
(
OH_HUKS_TAG_TYPE_BYTES
|
504
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_PRODUCT
==
(
OH_HUKS_TAG_TYPE_BYTES
|
505
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_SERIAL
==
(
OH_HUKS_TAG_TYPE_BYTES
|
506
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_IMEI
==
(
OH_HUKS_TAG_TYPE_BYTES
|
507
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_MEID
==
(
OH_HUKS_TAG_TYPE_BYTES
|
508
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_MANUFACTURER
==
(
OH_HUKS_TAG_TYPE_BYTES
|
509
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_MODEL
==
(
OH_HUKS_TAG_TYPE_BYTES
|
510
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_ALIAS
==
(
OH_HUKS_TAG_TYPE_BYTES
|
511
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_SOCID
==
(
OH_HUKS_TAG_TYPE_BYTES
|
512
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_UDID
==
(
OH_HUKS_TAG_TYPE_BYTES
|
513
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO
==
(
OH_HUKS_TAG_TYPE_BYTES
|
514
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO
==
(
OH_HUKS_TAG_TYPE_BYTES
|
515
),
true
);
...
...
@@ -229,8 +214,6 @@ namespace Unittest::HuksMisc
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_KEY_ROLE
==
(
OH_HUKS_TAG_TYPE_UINT
|
1006
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_KEY_FLAG
==
(
OH_HUKS_TAG_TYPE_UINT
|
1007
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_IS_ASYNCHRONIZED
==
(
OH_HUKS_TAG_TYPE_UINT
|
1008
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_SECURE_KEY_ALIAS
==
(
OH_HUKS_TAG_TYPE_BOOL
|
1009
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_SECURE_KEY_UUID
==
(
OH_HUKS_TAG_TYPE_BYTES
|
1010
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_KEY_DOMAIN
==
(
OH_HUKS_TAG_TYPE_UINT
|
1011
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_SYMMETRIC_KEY_DATA
==
(
OH_HUKS_TAG_TYPE_BYTES
|
20001
),
true
);
ASSERT_EQ
((
uint32_t
)
OH_HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA
==
(
OH_HUKS_TAG_TYPE_BYTES
|
20002
),
true
);
...
...
@@ -310,4 +293,4 @@ namespace Unittest::HuksMisc
ASSERT_EQ
(
sizeof
(
keyMaterial25519
.
priKeySize
)
==
sizeof
(
uint32_t
),
true
);
ASSERT_EQ
(
sizeof
(
keyMaterial25519
.
reserved
)
==
sizeof
(
uint32_t
),
true
);
}
}
\ No newline at end of file
}
security/huks_napi_BasicTest/src/huks_nullptr_test.cpp
浏览文件 @
33af1070
...
...
@@ -82,8 +82,8 @@ HWTEST_F(HuksNullptrTest, Security_HUKS_NAPI_nullptr_0100, TestSize.Level0)
ret
=
OH_Huks_IsParamSetValid
(
paramSetNullptr
,
0
);
EXPECT_NE
(
ret
.
errorCode
,
OH_HUKS_SUCCESS
)
<<
"this case failed."
;
struct
OH_Huks_Param
baseParam
=
{
.
tag
=
OH_HUKS_TAG_
INVALID
,
.
uint64Param
=
(
uint64_t
)
1
};
struct
OH_Huks_Param
otherParam
=
{
.
tag
=
OH_HUKS_TAG_
INVALID
,
.
uint64Param
=
(
uint64_t
)
2
};
struct
OH_Huks_Param
baseParam
=
{
.
tag
=
OH_HUKS_TAG_
ALGORITHM
,
.
uint64Param
=
(
uint64_t
)
1
};
struct
OH_Huks_Param
otherParam
=
{
.
tag
=
OH_HUKS_TAG_
ALGORITHM
,
.
uint64Param
=
(
uint64_t
)
2
};
ret
=
OH_Huks_CheckParamMatch
(
&
baseParam
,
&
otherParam
);
EXPECT_NE
(
ret
.
errorCode
,
OH_HUKS_SUCCESS
)
<<
"this case failed."
;
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
15464ac6
·
11月 17, 2022
mentioned in commit
15464ac6
mentioned in commit 15464ac69e59a4041b0fc34ed8d6e53cea522c7f
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录