Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0308fa12
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看板
提交
0308fa12
编写于
10月 25, 2022
作者:
Q
qiaozzzh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
告警修改
Signed-off-by:
N
qiaozzzh
<
qiaozhang@huawei.com
>
Change-Id: I670398cc68d01f03178ed47bf5663923c9bad7d5
上级
6b0f6fd0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
28 deletion
+28
-28
security_lite/huks/common/hks_test_api_performance.c
security_lite/huks/common/hks_test_api_performance.c
+10
-10
security_lite/permission_posix/capability/src/ActsCapability.cpp
...y_lite/permission_posix/capability/src/ActsCapability.cpp
+1
-1
security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp
...te/permission_posix/capability/src/ActsCapabilityTest.cpp
+9
-9
security_lite/permission_posix/dac/src/ActsDacPreTest.cpp
security_lite/permission_posix/dac/src/ActsDacPreTest.cpp
+7
-7
security_lite/permission_posix/pms/src/ActsPMSLoadTest.cpp
security_lite/permission_posix/pms/src/ActsPMSLoadTest.cpp
+1
-1
未找到文件。
security_lite/huks/common/hks_test_api_performance.c
浏览文件 @
0308fa12
...
...
@@ -28,7 +28,7 @@
int32_t
HksGenerateKeyRun
(
const
struct
HksBlob
*
keyAlias
,
const
struct
HksParamSet
*
paramSetIn
,
struct
HksParamSet
*
paramSetOut
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
/* if keyAlias exist, the key will be generated and refreshed */
for
(
uint32_t
i
=
0
;
i
<
performTimes
;
++
i
)
{
ret
=
HksGenerateKey
(
keyAlias
,
paramSetIn
,
paramSetOut
);
...
...
@@ -42,7 +42,7 @@ int32_t HksGenerateKeyRun(const struct HksBlob *keyAlias, const struct HksParamS
int32_t
HksEncryptRun
(
const
struct
HksBlob
*
key
,
const
struct
HksParamSet
*
paramSet
,
const
struct
HksBlob
*
plainText
,
struct
HksBlob
*
cipherText
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriCipherTestSize
=
0
;
if
(
cipherText
!=
NULL
)
{
oriCipherTestSize
=
cipherText
->
size
;
...
...
@@ -65,7 +65,7 @@ int32_t HksEncryptRun(const struct HksBlob *key, const struct HksParamSet *param
int32_t
HksDecryptRun
(
const
struct
HksBlob
*
key
,
const
struct
HksParamSet
*
paramSet
,
const
struct
HksBlob
*
cipherText
,
struct
HksBlob
*
plainText
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriPlainTextSize
=
0
;
if
(
plainText
!=
NULL
)
{
oriPlainTextSize
=
plainText
->
size
;
...
...
@@ -87,7 +87,7 @@ int32_t HksDecryptRun(const struct HksBlob *key, const struct HksParamSet *param
int32_t
HksMacRun
(
const
struct
HksBlob
*
key
,
const
struct
HksParamSet
*
paramSet
,
const
struct
HksBlob
*
srcData
,
struct
HksBlob
*
mac
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriMacSize
=
0
;
if
(
mac
!=
NULL
)
{
oriMacSize
=
mac
->
size
;
...
...
@@ -109,7 +109,7 @@ int32_t HksMacRun(const struct HksBlob *key, const struct HksParamSet *paramSet,
int32_t
HksDeriveKeyRun
(
const
struct
HksParamSet
*
paramSet
,
const
struct
HksBlob
*
masterKey
,
struct
HksBlob
*
derivedKey
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriDerivedKeySize
=
0
;
if
(
derivedKey
!=
NULL
)
{
oriDerivedKeySize
=
derivedKey
->
size
;
...
...
@@ -136,7 +136,7 @@ int32_t HksDeleteKeyRun(const struct HksBlob *keyAlias, uint32_t performTimes)
int32_t
HksKeyExistRun
(
const
struct
HksBlob
*
keyAlias
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
for
(
uint32_t
i
=
0
;
i
<
performTimes
;
++
i
)
{
ret
=
HksKeyExist
(
keyAlias
,
NULL
);
if
(
ret
!=
HKS_SUCCESS
)
{
...
...
@@ -148,7 +148,7 @@ int32_t HksKeyExistRun(const struct HksBlob *keyAlias, uint32_t performTimes)
int32_t
HksGenerateRandomRun
(
struct
HksBlob
*
random
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriRandomSize
=
0
;
if
(
random
!=
NULL
)
{
oriRandomSize
=
random
->
size
;
...
...
@@ -170,7 +170,7 @@ int32_t HksGenerateRandomRun(struct HksBlob *random, uint32_t performTimes)
int32_t
HksAgreeKeyRun
(
const
struct
HksParamSet
*
paramSet
,
const
struct
HksBlob
*
privateKey
,
const
struct
HksBlob
*
peerPublicKey
,
struct
HksBlob
*
agreedKey
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriAgreedKeySize
=
0
;
if
(
agreedKey
!=
NULL
)
{
oriAgreedKeySize
=
agreedKey
->
size
;
...
...
@@ -192,7 +192,7 @@ int32_t HksAgreeKeyRun(const struct HksParamSet *paramSet, const struct HksBlob
int32_t
HksHashRun
(
const
struct
HksParamSet
*
paramSet
,
const
struct
HksBlob
*
srcData
,
struct
HksBlob
*
hash
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriHashSize
=
0
;
if
(
hash
!=
NULL
)
{
oriHashSize
=
hash
->
size
;
...
...
@@ -215,7 +215,7 @@ int32_t HksHashRun(const struct HksParamSet *paramSet,
int32_t
HksBnExpModRun
(
struct
HksBlob
*
x
,
const
struct
HksBlob
*
a
,
const
struct
HksBlob
*
e
,
const
struct
HksBlob
*
n
,
uint32_t
performTimes
)
{
int32_t
ret
;
int32_t
ret
=
0
;
uint32_t
oriXSize
=
0
;
if
(
x
!=
NULL
)
{
oriXSize
=
x
->
size
;
...
...
security_lite/permission_posix/capability/src/ActsCapability.cpp
浏览文件 @
0308fa12
...
...
@@ -508,7 +508,7 @@ char *GetCurrentPath()
int
CheckFsMount
(
const
char
*
topDir
,
const
char
*
topDirMountInfo
)
{
const
int
lenMax
=
100
;
int
len
;
int
len
=
0
;
char
buf
[
lenMax
]
=
{
0
};
const
char
mountInfoFile
[]
=
"/proc/mounts"
;
// check topDir exist
...
...
security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp
浏览文件 @
0308fa12
...
...
@@ -344,7 +344,7 @@ static int CapgetWithCaps(pid_t pid, unsigned int caps)
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest0600
,
Function
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status1
=
0
;
int
status2
=
0
;
// Preset action: Fork a sub process pid1
...
...
@@ -404,7 +404,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest0600, Function | MediumTest | Level2
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest0700
,
Function
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
pid_t
pid
=
fork
();
// Preset action: Fork a sub process
ASSERT_TRUE
(
pid
>=
0
)
<<
"======== Fork Error! ========="
;
...
...
@@ -454,7 +454,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest0700, Function | MediumTest | Level2
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest0800
,
Function
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
// Preset action: Fork a sub process
pid_t
pid
=
fork
();
...
...
@@ -522,7 +522,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest0800, Function | MediumTest | Level2
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest0900
,
Security
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
// Preset action: Fork a sub process
pid_t
pid
=
fork
();
...
...
@@ -559,7 +559,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest0900, Security | MediumTest | Level2
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest1000
,
Function
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status1
=
0
;
int
status2
=
0
;
// Preset action: Fork a sub process pid1
...
...
@@ -623,7 +623,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest1000, Function | MediumTest | Level2
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest1100
,
Function
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
struct
timespec
tp
=
{
0
};
// Preset action: Fork a sub process
...
...
@@ -821,7 +821,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest1500, Reliability | MediumTest | Lev
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest1600
,
Reliability
|
MediumTest
|
Level3
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
// Preset action: Fork a sub process
pid_t
pid
=
fork
();
...
...
@@ -901,7 +901,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest1700, Reliability | MediumTest | Lev
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest1800
,
Reliability
|
MediumTest
|
Level3
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
// Preset action: Fork a sub process
pid_t
pid
=
fork
();
...
...
@@ -939,7 +939,7 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest1800, Reliability | MediumTest | Lev
*/
HWTEST_F
(
CapabilityTestSuite
,
CapabilityTest1900
,
Reliability
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
// Preset action: Fork a sub process
pid_t
pid
=
fork
();
...
...
security_lite/permission_posix/dac/src/ActsDacPreTest.cpp
浏览文件 @
0308fa12
...
...
@@ -642,7 +642,7 @@ HWTEST_F(DacTestSuite, DACTest0020, Function | MediumTest | Level1)
*/
HWTEST_F
(
DacTestSuite
,
DACTest0030
,
Function
|
MediumTest
|
Level1
)
{
int
ret
;
int
ret
=
0
;
gid_t
grouplist
[
SIZE255
];
// Preset action: Obtain the groups of the current process
unsigned
int
groupsize
=
getgroups
(
0
,
grouplist
);
...
...
@@ -677,7 +677,7 @@ HWTEST_F(DacTestSuite, DACTest0030, Function | MediumTest | Level1)
*/
HWTEST_F
(
DacTestSuite
,
DACTest0040
,
Function
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
gid_t
grouplist
[
SIZE255
];
// Preset action: Obtain the groups of the current process
unsigned
int
groupsize
=
getgroups
(
0
,
grouplist
);
...
...
@@ -712,7 +712,7 @@ HWTEST_F(DacTestSuite, DACTest0040, Function | MediumTest | Level2)
*/
HWTEST_F
(
DacTestSuite
,
DACTest0050
,
Function
|
MediumTest
|
Level3
)
{
int
ret
;
int
ret
=
0
;
gid_t
grouplist
[
SIZE255
];
// Preset action: Obtain the groups of the current process
unsigned
int
groupsize
=
getgroups
(
0
,
grouplist
);
...
...
@@ -747,7 +747,7 @@ HWTEST_F(DacTestSuite, DACTest0050, Function | MediumTest | Level3)
*/
HWTEST_F
(
DacTestSuite
,
DACTest0060
,
Function
|
MediumTest
|
Level3
)
{
int
ret
;
int
ret
=
0
;
gid_t
grouplist
[
SIZE255
];
// Preset action: Obtain the groups of the current process
size_t
groupsize
=
getgroups
(
0
,
grouplist
);
...
...
@@ -787,7 +787,7 @@ HWTEST_F(DacTestSuite, DACTest0060, Function | MediumTest | Level3)
*/
HWTEST_F
(
DacTestSuite
,
DACTest0070
,
Security
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
// Preset action: Fork three sub processes
pid_t
pid
;
...
...
@@ -849,7 +849,7 @@ HWTEST_F(DacTestSuite, DACTest0070, Security | MediumTest | Level2)
*/
HWTEST_F
(
DacTestSuite
,
DACTest0080
,
Function
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
uid_t
ruid
=
0
;
uid_t
euid
=
0
;
uid_t
suid
=
0
;
uid_t
newruid
=
0
;
uid_t
neweuid
=
0
;
uid_t
newsuid
=
0
;
gid_t
rgid
=
0
;
gid_t
egid
=
0
;
gid_t
sgid
=
0
;
...
...
@@ -909,7 +909,7 @@ HWTEST_F(DacTestSuite, DACTest0080, Function | MediumTest | Level2)
*/
HWTEST_F
(
DacTestSuite
,
DACTest0120
,
Security
|
MediumTest
|
Level2
)
{
int
ret
;
int
ret
=
0
;
int
status
=
0
;
// Preset action: Fork a sub process
pid_t
pid
=
fork
();
...
...
security_lite/permission_posix/pms/src/ActsPMSLoadTest.cpp
浏览文件 @
0308fa12
...
...
@@ -171,7 +171,7 @@ HWTEST_F(ActsPMSLoadTest, testSecPMPMS_0540, Function | MediumTest | Level1)
HWTEST_F
(
ActsPMSLoadTest
,
testSecPMPMS_0550
,
Function
|
MediumTest
|
Level0
)
{
SaveOrUpdatePermissions
(
TEST_APP_ID
,
g_systemPers
,
SYS_PERM_NUM
,
FIRST_INSTALL
);
int
i
;
int
i
=
0
;
for
(
i
=
0
;
i
<
SYS_PERM_NUM
;
i
++
)
{
g_interface
->
GrantPermission
(
TEST_APP_ID
,
g_systemPers
[
i
].
name
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录