Home
last modified time | relevance | path

Searched refs:DEVICE_ID_MAX_LEN (Results 1 – 23 of 23) sorted by relevance

/base/security/security_guard/interfaces/inner_api/obtaindata/src/
Dsg_obtaindata_client.cpp63 if (devId == nullptr || eventJson == nullptr || devId->length >= DEVICE_ID_MAX_LEN) { in RequestSecurityEventInfoAsyncImpl()
67 uint8_t tmp[DEVICE_ID_MAX_LEN] = {}; in RequestSecurityEventInfoAsyncImpl()
68 (void) memset_s(tmp, DEVICE_ID_MAX_LEN, 0, DEVICE_ID_MAX_LEN); in RequestSecurityEventInfoAsyncImpl()
69 errno_t rc = memcpy_s(tmp, DEVICE_ID_MAX_LEN, devId->identity, devId->length); in RequestSecurityEventInfoAsyncImpl()
79 if (devId.length() >= DEVICE_ID_MAX_LEN) { in RequestSecurityEventInfoAsyncImpl()
85 errno_t rc = memcpy_s(identity.identity, DEVICE_ID_MAX_LEN, devId.c_str(), devId.length()); in RequestSecurityEventInfoAsyncImpl()
/base/security/device_security_level/test/dslm_unit_test/
Ddslm_rpc_process_test.cpp61 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
79 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
97 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
112 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
127 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
142 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
169 …auto fillUpDeviceIdentify = [](DeviceIdentify *identify) { identify->length = DEVICE_ID_MAX_LEN; }; in __anon8d6221820102()
Ddslm_test.cpp1084 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
1106 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}};
1130 const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a', 'b', 'c', 'd', 'e', 'f', 'g'}};
1182 const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a', 'b', 'c', 'd', 'e', 'f', 'g'}};
1202 const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {0, 'b', 'c', 'd', 'e', 'f', 'g'}};
1222 const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a'}};
1300 const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a', 'b', 'c', 'd', 'e', 'f', 'a', 'b'}};
1316 const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a', 'b', 'c', 'd', 'e', 'f', 'a', 'b'}};
1333 … const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'}};
1386 … const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'}};
[all …]
/base/security/security_guard/test/fuzztest/classify/requestsecuritymodelresultsync_fuzzer/
Drequest_security_model_result_sync_fuzzer.cpp33 uint32_t cpyLen = size > DEVICE_ID_MAX_LEN ? DEVICE_ID_MAX_LEN : static_cast<uint32_t>(size); in RequestSecurityModelResultAsyncFuzzTest()
34 (void) memcpy_s(deviceIdentify.identity, DEVICE_ID_MAX_LEN, data, cpyLen); in RequestSecurityModelResultAsyncFuzzTest()
/base/security/security_guard/test/fuzztest/classify/requestsecuritymodelresultasync_fuzzer/
Drequest_security_model_result_async_fuzzer.cpp38 uint32_t cpyLen = size > DEVICE_ID_MAX_LEN ? DEVICE_ID_MAX_LEN : static_cast<uint32_t>(size); in RequestSecurityModelResultAsyncFuzzTest()
39 (void) memcpy_s(deviceIdentify.identity, DEVICE_ID_MAX_LEN, data, cpyLen); in RequestSecurityModelResultAsyncFuzzTest()
/base/security/security_guard/test/fuzztest/obtaindata/requestsecurityeventinfoasync_fuzzer/
Drequest_security_event_info_async_fuzzer.cpp40 uint32_t cpyLen = size > DEVICE_ID_MAX_LEN ? DEVICE_ID_MAX_LEN : static_cast<uint32_t>(size); in RequestSecurityEventInfoAsyncFuzzTest()
41 (void) memcpy_s(deviceIdentify.identity, DEVICE_ID_MAX_LEN, data, cpyLen); in RequestSecurityEventInfoAsyncFuzzTest()
/base/security/security_guard/interfaces/inner_api/classify/src/
Dsg_classify_client.cpp68 if (devId.length() >= DEVICE_ID_MAX_LEN) { in RequestSecurityModelResultSync()
103 if (devId.length() >= DEVICE_ID_MAX_LEN) { in RequestSecurityModelResultAsync()
124 …if (cppResult.devId.length() >= DEVICE_ID_MAX_LEN || cppResult.result.length() >= RESULT_MAX_LEN) { in FillingRequestResult()
129 …errno_t rc = memcpy_s(result->devId.identity, DEVICE_ID_MAX_LEN, cppResult.devId.c_str(), cppResul… in FillingRequestResult()
147 std::vector<char> id(DEVICE_ID_MAX_LEN, '\0'); in CovertDevId()
148 std::copy(&devId->identity[0], &devId->identity[DEVICE_ID_MAX_LEN - 1], id.begin()); in CovertDevId()
154 if (devId == nullptr || result == nullptr || devId->length >= DEVICE_ID_MAX_LEN) { in RequestSecurityModelResultSync()
166 if (devId == nullptr || devId->length >= DEVICE_ID_MAX_LEN) { in RequestSecurityModelResultAsync()
/base/security/device_security_level/test/dslm_fuzz_test/dslm_fuzzer/
Ddslm_fuzzer.cpp58 const uint8_t mockBuffer[DEVICE_ID_MAX_LEN] = {0};
146 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}}; in OnSendResultNotifierTest()
191 const DeviceIdentify device = {DEVICE_ID_MAX_LEN, {'a', 'b', 'c', 'd', 'e', 'f', 'a', 'b'}}; in VerifyOhosDslmCredTest()
206 DeviceIdentify device = {DEVICE_ID_MAX_LEN, {0}}; in RequestDeviceSecurityInfoTest()
328 deviceIdentify.length = DEVICE_ID_MAX_LEN; in OnPeerMsgReceivedFuzzer()
329 const uint8_t *buffer = parcel.ReadBuffer(DEVICE_ID_MAX_LEN); in OnPeerMsgReceivedFuzzer()
331 (void)memcpy_s(deviceIdentify.identity, DEVICE_ID_MAX_LEN, buffer, DEVICE_ID_MAX_LEN); in OnPeerMsgReceivedFuzzer()
364 const uint8_t *buffer = parcel.ReadBuffer(DEVICE_ID_MAX_LEN); in OnRemoteRequestFuzzer()
366 data.WriteBuffer(mockBuffer, DEVICE_ID_MAX_LEN); in OnRemoteRequestFuzzer()
368 data.WriteBuffer(buffer, DEVICE_ID_MAX_LEN); in OnRemoteRequestFuzzer()
/base/security/device_security_level/baselib/msglib/src/standard/
Dmessenger_device_status_manager.cpp120 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnNodeStateChange()
156 uint32_t maskId = MaskDeviceIdentity((const char *)&devId->identity[0], DEVICE_ID_MAX_LEN); in ProcessDeviceStatusReceiver()
197 auto size = (udid.size() < DEVICE_ID_MAX_LEN) ? udid.size() : DEVICE_ID_MAX_LEN; in MessengerConvertNodeToIdentity()
200 if (memcpy_s(devId.identity, DEVICE_ID_MAX_LEN, udid.c_str(), size) != EOK) { in MessengerConvertNodeToIdentity()
208 devId.length = DEVICE_ID_MAX_LEN; in MessengerConvertNodeToIdentity()
225 DeviceIdentify curr = {DEVICE_ID_MAX_LEN, {0}}; in MessengerGetDeviceNodeBasicInfo()
342 uint32_t maskId = MaskDeviceIdentity((const char *)&devId->identity[0], DEVICE_ID_MAX_LEN); in MessengerGetSelfDeviceIdentify()
363 DeviceIdentify curr = {DEVICE_ID_MAX_LEN, {0}}; in MessengerForEachDeviceProcess()
Dmessenger_device_socket_manager.c272 uint32_t maskId = MaskDeviceIdentity((const char *)identity->identity, DEVICE_ID_MAX_LEN); in CreateSocketNodeInfo()
331 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in ServerOnBind()
352 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in ServerOnBytes()
369 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in ClientOnBytes()
643 char NetworkId[DEVICE_ID_MAX_LEN + 1] = {0}; in PrepareBindSocket()
644 if (!MessengerGetNetworkIdByDeviceIdentify(devId, NetworkId, DEVICE_ID_MAX_LEN + 1)) { in PrepareBindSocket()
648 uint32_t maskId = MaskDeviceIdentity((const char *)&devId->identity, DEVICE_ID_MAX_LEN); in PrepareBindSocket()
/base/security/security_guard/interfaces/inner_api/common/include/
Dsecurity_guard_api.h26 #define DEVICE_ID_MAX_LEN 64 macro
38 uint8_t identity[DEVICE_ID_MAX_LEN];
/base/security/device_security_level/interfaces/inner_api/include/
Ddevice_security_defines.h25 #define DEVICE_ID_MAX_LEN 64 macro
29 uint8_t identity[DEVICE_ID_MAX_LEN];
/base/security/device_security_level/interfaces/inner_api/src/standard/
Ddevice_security_level_proxy.cpp51 if (length == 0 || length > DEVICE_ID_MAX_LEN) { in RequestDeviceSecurityLevel()
63 data.WriteBuffer(identify.identity, DEVICE_ID_MAX_LEN); in RequestDeviceSecurityLevel()
/base/security/device_security_level/baselib/msglib/src/lite/
Dmessenger_device_status_manager.c139 if (memcpy_s(identity.identity, DEVICE_ID_MAX_LEN, udid, UDID_BUF_LEN - 1) != EOK) { in MessengerOnNodeStateChange()
232 if (memcpy_s(devId->identity, DEVICE_ID_MAX_LEN, udid, DEVICE_ID_MAX_LEN) != EOK) { in MessengerConvertNodeToIdentity()
236 devId->length = DEVICE_ID_MAX_LEN; in MessengerConvertNodeToIdentity()
259 DeviceIdentify curr = {DEVICE_ID_MAX_LEN, {0}}; in MessengerGetDeviceNodeBasicInfo()
355 DeviceIdentify devId = {DEVICE_ID_MAX_LEN, {0}}; in MessengerForEachDeviceProcess()
Dmessenger_device_session_manager.c136 char networkId[DEVICE_ID_MAX_LEN + 1] = {0}; in GetDeviceIdentityFromSessionId()
137 int ret = GetPeerDeviceId(sessionId, networkId, DEVICE_ID_MAX_LEN + 1); in GetDeviceIdentityFromSessionId()
148 *maskId = MaskDeviceIdentity((const char *)identity->identity, DEVICE_ID_MAX_LEN); in GetDeviceIdentityFromSessionId()
166 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnSessionOpened()
203 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnSessionOpened()
279 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnBytesReceived()
426 char deviceName[DEVICE_ID_MAX_LEN + 1] = {0}; in CreateNewDeviceSession()
427 bool succ = MessengerGetNetworkIdByDeviceIdentify(devId, deviceName, DEVICE_ID_MAX_LEN + 1); in CreateNewDeviceSession()
/base/security/device_security_level/baselib/msglib/include/
Dmessenger.h27 #define DEVICE_ID_MAX_LEN 64 macro
30 uint8_t identity[DEVICE_ID_MAX_LEN];
/base/security/device_security_level/services/sa/lite/small/
Ddslm_ipc_process.c58 uint32_t *dataRead = ReadBuffer(req, DEVICE_ID_MAX_LEN); in DslmGetRequestFromParcel()
63 if (memcpy_s(identity->identity, DEVICE_ID_MAX_LEN, dataRead, DEVICE_ID_MAX_LEN) != EOK) { in DslmGetRequestFromParcel()
/base/security/device_security_level/services/sa/standard/
Ddslm_ipc_process.cpp75 const uint8_t *dataRead = data.ReadBuffer(DEVICE_ID_MAX_LEN); in DslmGetRequestFromParcel()
80 if (memcpy_s(identify.identity, DEVICE_ID_MAX_LEN, dataRead, DEVICE_ID_MAX_LEN) != EOK) { in DslmGetRequestFromParcel()
/base/security/device_security_level/interfaces/inner_api/src/lite/small/
Ddevice_security_level_proxy.c73 if (identify.length == 0 || identify.length > DEVICE_ID_MAX_LEN) { in DslmIpcAsyncCallImpl()
84 WriteBuffer(&request, identify.identity, DEVICE_ID_MAX_LEN); in DslmIpcAsyncCallImpl()
/base/security/security_guard/frameworks/js/napi/
Dsecurity_guard_napi.h29 constexpr int DEVICE_ID_MAX_LEN = 64; variable
Dsecurity_guard_napi.cpp790 char deviceId[DEVICE_ID_MAX_LEN]; in NapiRequestSecurityModelResult()
/base/security/device_security_level/services/dslm/
Ddslm_device_list.c87 if (device->length != DEVICE_ID_MAX_LEN) { in CreatOrGetDslmDeviceInfo()
/base/security/device_security_level/services/dfx/
Ddslm_hidumper.c141 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}}; in GetDefaultStatus()