提交 03e4aff9 编写于 作者: L li-zipei

deviceauth

Signed-off-by: Nli-zipei <lizipei@huawei.com>
Change-Id: I834509ebaca7aaba6b6066986e52b753056a1ddf
上级 17fe3d0a
......@@ -49,13 +49,12 @@ ohos_moduletest_suite("DeviceAuthFunctionTest") {
"//base/security/deviceauth/services/common/inc/broadcast_manager",
"//base/security/deviceauth/hals/inc/common",
"//base/security/deviceauth/hals/inc/linux",
"//base/security/deviceauth/hals/inc/liteos",
"//base/security/deviceauth/hals/inc/dev_info/3516",
"//base/security/deviceauth/frameworks/inc",
]
deps = [
"//base/security/deviceauth/services:deviceauth_sdk",
"//base/security/deviceauth/services:deviceauth",
"//base/security/deviceauth/services:deviceauth_service",
"//base/security/huks/interfaces/innerkits/huks_standard/main:libhukssdk",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static",
......
{
"description": "Config for hcpptest demo test cases",
"environment": [
{
"type": "device",
"label": "ipcamera"
}
],
"kits": [
{
"type": "MountKit",
"server": "NfsServer",
"mount": [
{
"source": "testcases/security",
"target": "/test_root/security"
}
]
"push": [
"DeviceAuthFunctionTest->/data/local/tmp/DeviceAuthFunctionTest"
],
"type": "PushKit"
}
],
"driver": {
"type": "CppTestLite",
"execute": "/test_root/security/ActsDeviceAuthFunctionTest.bin"
}
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "DeviceAuthFunctionTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for DeviceAuthFunctionTest Tests"
}
......@@ -16,9 +16,7 @@
#ifndef DEVICEAUTH_STANDARD_TEST_H
#define DEVICEAUTH_STANDARD_TEST_H
#include <cstdint>
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "device_auth.h"
const char *TEST_APP_NAME = "TestApp";
......
......@@ -21,5 +21,6 @@
#include "hc_dev_info.h"
void SetClient(bool tag);
bool GetClient();
#endif
......@@ -24,4 +24,24 @@ void SetClient(bool tag)
g_testForClient = tag;
}
bool GetClient()
{
return g_testForClient;
}
int32_t HcGetUdid(uint8_t *udid, int32_t udidLen)
{
const char *clientUdid = "D6350E39AD8F11963C181BEEDC11AC85158E04466B68F1F4E6D895237E0FE81C";
const char *serverUdid = "ABCDEF00ABCDEF00ABCDEF00ABCDEF00ABCDEF00ABCDEF00ABCDEF00ABCDEF00";
if (g_testForClient) {
(void)memcpy_s(udid, udidLen - 1, clientUdid, strlen(clientUdid));
return 0;
}
(void)memcpy_s(udid, udidLen - 1, serverUdid, strlen(serverUdid));
return 0;
}
const char *GetStoragePath()
{
return "/data/data/deviceauth/hcgroup.dat";
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册