/ohos5.0/base/security/device_security_level/test/dslm_fuzz_test/dslm_fuzzer/ |
H A D | dslm_fuzzer.cpp | 95 void (*process)(DeviceIdentify *deviceIdentify, Parcel &parcel); 125 void ServiceTest(DeviceIdentify *deviceIdentify, Parcel &parcel) in ServiceTest() 132 static DeviceIdentify self = {0, {0}}; in ServiceTest() 146 const DeviceIdentify identify = {DEVICE_ID_MAX_LEN, {0}}; in OnSendResultNotifierTest() 168 static DeviceIdentify self = {0, {0}}; in MessengerSendMsgToTest() 184 void DslmDumperTest(DeviceIdentify *deviceIdentify, Parcel &parcel) in DslmDumperTest() 206 DeviceIdentify device = {DEVICE_ID_MAX_LEN, {0}}; in RequestDeviceSecurityInfoTest() 221 void Base64EncodeAppTest(DeviceIdentify *deviceIdentify, Parcel &parcel) in Base64EncodeAppTest() 230 void SerializeTest(DeviceIdentify *deviceIdentify, Parcel &parcel) in SerializeTest() 302 void ReportHiEventTest(DeviceIdentify *deviceIdentify, Parcel &parcel) in ReportHiEventTest() [all …]
|
/ohos5.0/base/security/device_security_level/test/dslm_unit_test/ |
H A D | dslm_msg_interface_mock.cpp | 29 extern int32_t OnPeerMsgReceived(const DeviceIdentify *devId, const uint8_t *msg, uint32_t len); 30 extern int32_t OnSendResultNotifier(const DeviceIdentify *devId, uint64_t transNo, uint32_t result); 31 extern int32_t OnPeerStatusReceiver(const DeviceIdentify *deviceId, uint32_t status, int32_t level); 55 … auto loopback = [this](const Messenger *messenger, uint64_t transNo, const DeviceIdentify *devId, in MakeMsgLoopback() 64 void DslmMsgInterfaceMock::MakeSelfDeviceId(const DeviceIdentify *self) const in MakeSelfDeviceId() 66 … auto loopback = [this, self](const Messenger *messenger, DeviceIdentify *devId, int32_t *level) { in MakeSelfDeviceId() 74 void DslmMsgInterfaceMock::MakeDeviceOnline(const DeviceIdentify *devId) const in MakeDeviceOnline() 79 void DslmMsgInterfaceMock::MakeDeviceOffline(const DeviceIdentify *devId) const in MakeDeviceOffline() 114 bool GetDeviceOnlineStatusImpl(const Messenger *messenger, const DeviceIdentify *devId, int32_t *le… in GetDeviceOnlineStatusImpl() 119 bool GetSelfDeviceIdentifyImpl(const Messenger *messenger, DeviceIdentify *devId, int32_t *level) in GetSelfDeviceIdentifyImpl() [all …]
|
H A D | dslm_msg_interface_mock.h | 36 …virtual uint64_t SendMsgTo(const Messenger *messenger, uint64_t transNo, const DeviceIdentify *dev… 39 …virtual bool GetDeviceOnlineStatus(const Messenger *messenger, const DeviceIdentify *devId, int32_… 41 …virtual bool GetSelfDeviceIdentify(const Messenger *messenger, DeviceIdentify *devId, int32_t *lev… 51 …HOD5(SendMsgTo, uint64_t(const Messenger *messenger, uint64_t transNo, const DeviceIdentify *devId, 54 bool(const Messenger *messenger, const DeviceIdentify *devId, int32_t *level)); 55 …MOCK_METHOD3(GetSelfDeviceIdentify, bool(const Messenger *messenger, DeviceIdentify *devId, int32_… 58 void MakeSelfDeviceId(const DeviceIdentify *devId) const; 59 void MakeDeviceOnline(const DeviceIdentify *devId) const; 60 void MakeDeviceOffline(const DeviceIdentify *devId) const; 61 … void MakeMsgReceivedFrom(const DeviceIdentify *devId, const uint8_t *msg, uint32_t msgLen) const;
|
H A D | dslm_rpc_process_test.cpp | 26 extern "C" int32_t OnPeerMsgReceived(const DeviceIdentify *devId, const uint8_t *msg, uint32_t len); 27 extern "C" int32_t OnSendResultNotifier(const DeviceIdentify *devId, uint64_t transNo, uint32_t res… 61 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 __anon0649868d0102()
|
H A D | dslm_test.cpp | 64 DeviceIdentify srcIdentity; 1347 const DeviceIdentify *device = nullptr; 1376 const DeviceIdentify *device = nullptr; 1426 DeviceIdentify device = {DEVICE_ID_MAX_LEN, {0}}; 1456 DeviceIdentify device = {DEVICE_ID_MAX_LEN, {0}}; 1475 DeviceIdentify device = {DEVICE_ID_MAX_LEN, {0}}; 1634 DeviceIdentify *device = nullptr; 1641 DeviceIdentify *device = nullptr; 1655 DeviceIdentify *device_first = nullptr; 1656 DeviceIdentify device_second; [all …]
|
/ohos5.0/base/security/device_security_level/baselib/msglib/include/ |
H A D | messenger.h | 28 typedef struct DeviceIdentify { struct 31 } DeviceIdentify; typedef 34 typedef int32_t (*DeviceMessageReceiver)(const DeviceIdentify *devId, const uint8_t *msg, uint32_t … 36 typedef int32_t (*DeviceStatusReceiver)(const DeviceIdentify *devId, uint32_t status, int32_t level… 38 typedef int32_t (*MessageSendResultNotifier)(const DeviceIdentify *devId, uint64_t transNo, uint32_… 40 typedef int32_t (*DeviceProcessor)(const DeviceIdentify *devId, int32_t level, void *para); 86 void SendMsgTo(const Messenger *messenger, uint64_t transNo, const DeviceIdentify *devId, const uin… 89 bool GetDeviceOnlineStatus(const Messenger *messenger, const DeviceIdentify *devId, int32_t *level); 91 bool GetSelfDeviceIdentify(const Messenger *messenger, DeviceIdentify *devId, int32_t *level); 95 bool GetDeviceStatisticInfo(const Messenger *messenger, const DeviceIdentify *devId, StatisticInfor…
|
/ohos5.0/base/security/device_security_level/services/include/ |
H A D | dslm_messenger_wrapper.h | 31 typedef int32_t (*MessageReceiver)(const DeviceIdentify *devId, const uint8_t *msg, uint32_t len); 33 typedef int32_t (*StatusReceiver)(const DeviceIdentify *devId, uint32_t status, int32_t level); 35 typedef int32_t (*SendResultNotifier)(const DeviceIdentify *devId, uint64_t transNo, uint32_t resul… 37 typedef int32_t (*DeviceProcessor)(const DeviceIdentify *devId, int32_t level, void *para); 39 void SendMsgToDevice(uint64_t transNo, const DeviceIdentify *devId, const uint8_t *msg, uint32_t ms… 48 bool GetPeerDeviceOnlineStatus(const DeviceIdentify *devId, int32_t *level); 50 const DeviceIdentify *GetSelfDevice(int32_t *level);
|
H A D | dslm_core_process.h | 30 int32_t OnPeerMsgRequestInfoReceived(const DeviceIdentify *deviceId, const uint8_t *msg, uint32_t l… 32 int32_t OnPeerMsgResponseInfoReceived(const DeviceIdentify *deviceId, const uint8_t *msg, uint32_t … 34 int32_t OnRequestDeviceSecLevelInfo(const DeviceIdentify *deviceId, const RequestOption *option, ui… 37 int32_t OnMsgSendResultNotifier(const DeviceIdentify *deviceId, uint64_t transNo, uint32_t result); 39 int32_t OnPeerStatusReceiver(const DeviceIdentify *deviceId, uint32_t status, int32_t level);
|
/ohos5.0/base/security/security_guard/interfaces/inner_api/obtaindata/test/unittest/src/ |
H A D | obtaindata_kit_test.cpp | 28 int32_t RequestSecurityModelResultAsync(const DeviceIdentify *devId, uint32_t modelId, 63 void ObtainDataKitTest::RequestSecurityEventInfoCallBackFunc(const DeviceIdentify *devId, const cha… in RequestSecurityEventInfoCallBackFunc() 78 DeviceIdentify deviceIdentify = {}; 92 DeviceIdentify deviceIdentify = {}; 106 DeviceIdentify deviceIdentify = {}; 120 DeviceIdentify deviceIdentify = {}; 134 DeviceIdentify deviceIdentify = {}; 148 DeviceIdentify deviceIdentify = {}; 175 DeviceIdentify deviceIdentify = {};
|
/ohos5.0/base/security/device_security_level/baselib/msglib/src/lite/ |
H A D | messenger_device_status_manager.c | 31 static int32_t InitDeviceOnlineProcessor(const DeviceIdentify *devId, int32_t level, void *para); 41 DeviceIdentify srcIdentity; 105 …t ret = (uint32_t)memcpy_s(&data->srcIdentity, sizeof(DeviceIdentify), devId, sizeof(DeviceIdentif… in ProcessDeviceStatusReceiver() 137 DeviceIdentify identity = {0, {0}}; in MessengerOnNodeStateChange() 219 static bool MessengerConvertNodeToIdentity(const NodeBasicInfo *node, DeviceIdentify *devId) in MessengerConvertNodeToIdentity() 240 bool MessengerGetDeviceNodeBasicInfo(const DeviceIdentify *devId, NodeBasicInfo *info) in MessengerGetDeviceNodeBasicInfo() 259 DeviceIdentify curr = {DEVICE_ID_MAX_LEN, {0}}; in MessengerGetDeviceNodeBasicInfo() 278 bool MessengerGetDeviceOnlineStatus(const DeviceIdentify *devId, int32_t *level) in MessengerGetDeviceOnlineStatus() 310 bool MessengerGetSelfDeviceIdentify(DeviceIdentify *devId, int32_t *level) in MessengerGetSelfDeviceIdentify() 355 DeviceIdentify devId = {DEVICE_ID_MAX_LEN, {0}}; in MessengerForEachDeviceProcess() [all …]
|
H A D | messenger_device_session_manager.c | 53 DeviceIdentify destIdentity; 62 DeviceIdentify identity; 166 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnSessionOpened() 181 … (void)memcpy_s(&sessionInfo->identity, sizeof(DeviceIdentify), &identity, sizeof(DeviceIdentify)); in MessengerOnSessionOpened() 203 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnSessionOpened() 218 … (void)memcpy_s(&sessionInfo->identity, sizeof(DeviceIdentify), &identity, sizeof(DeviceIdentify)); in MessengerOnSessionOpened() 279 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnBytesReceived() 381 static bool GetOpenedSessionId(const DeviceIdentify *devId, int32_t *sessionId) in GetOpenedSessionId() 415 (void)memcpy_s(&data->destIdentity, sizeof(DeviceIdentify), devId, sizeof(DeviceIdentify)); in PushMsgDataToPendingList() 423 static void CreateNewDeviceSession(const DeviceIdentify *devId) in CreateNewDeviceSession() [all …]
|
/ohos5.0/base/security/device_security_level/baselib/msglib/src/standard/ |
H A D | messenger_device_socket_manager.c | 54 DeviceIdentify destIdentity; 63 DeviceIdentify identity; 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() 561 …int32_t ret = memcpy_s(&data->destIdentity, sizeof(DeviceIdentify), devId, sizeof(DeviceIdentify)); in PushMsgDataToPendingList() 693 DeviceIdentify *devId = (DeviceIdentify *)arg; in BindSyncWithPthread() 695 DeviceIdentify identity = *devId; in BindSyncWithPthread() 714 static void BindAsyncAction(const DeviceIdentify *devId) in BindAsyncAction() 720 DeviceIdentify *identity = MALLOC(sizeof(DeviceIdentify)); in BindAsyncAction() [all …]
|
H A D | messenger_device_status_manager.cpp | 93 DeviceIdentify srcIdentity {0, {0}}; 125 DeviceIdentify identity = {DEVICE_ID_MAX_LEN, {0}}; in MessengerOnNodeStateChange() 192 static bool MessengerConvertNodeToIdentity(const std::string &networkId, DeviceIdentify &devId) in MessengerConvertNodeToIdentity() 204 static_cast<void>(memset_s(&devId, sizeof(DeviceIdentify), 0, sizeof(DeviceIdentify))); in MessengerConvertNodeToIdentity() 217 static bool MessengerGetDeviceNodeBasicInfo(const DeviceIdentify &devId, DmDeviceInfo &info) in MessengerGetDeviceNodeBasicInfo() 230 DeviceIdentify curr = {DEVICE_ID_MAX_LEN, {0}}; in MessengerGetDeviceNodeBasicInfo() 306 auto process = [](const DeviceIdentify *devId, int32_t level, void *para) -> int32_t { in InitDeviceStatusManager() 326 bool MessengerGetDeviceOnlineStatus(const DeviceIdentify *devId, int32_t *level) in MessengerGetDeviceOnlineStatus() 340 bool MessengerGetSelfDeviceIdentify(DeviceIdentify *devId, int32_t *level) in MessengerGetSelfDeviceIdentify() 384 DeviceIdentify curr = {DEVICE_ID_MAX_LEN, {0}}; in MessengerForEachDeviceProcess() [all …]
|
/ohos5.0/base/security/device_security_level/services/dslm/ |
H A D | dslm_core_process.c | 50 static const DeviceIdentify *RefreshDeviceOnlineStatus(const DeviceIdentify *deviceId); 52 int32_t OnPeerMsgRequestInfoReceived(const DeviceIdentify *deviceId, const uint8_t *msg, uint32_t l… in OnPeerMsgRequestInfoReceived() 89 int32_t OnPeerMsgResponseInfoReceived(const DeviceIdentify *deviceId, const uint8_t *msg, uint32_t … in OnPeerMsgResponseInfoReceived() 112 int32_t OnMsgSendResultNotifier(const DeviceIdentify *deviceId, uint64_t transNo, uint32_t result) in OnMsgSendResultNotifier() 139 int32_t OnRequestDeviceSecLevelInfo(const DeviceIdentify *deviceId, const RequestOption *option, ui… in OnRequestDeviceSecLevelInfo() 152 const DeviceIdentify *curr = RefreshDeviceOnlineStatus(deviceId); in OnRequestDeviceSecLevelInfo() 183 int32_t OnPeerStatusReceiver(const DeviceIdentify *deviceId, uint32_t status, int32_t level) in OnPeerStatusReceiver() 203 const DeviceIdentify *device = GetSelfDevice(&level); in InitSelfDeviceSecureLevel() 273 static const DeviceIdentify *RefreshDeviceOnlineStatus(const DeviceIdentify *deviceId) in RefreshDeviceOnlineStatus()
|
H A D | dslm_device_list.h | 34 DslmDeviceInfo *CreatOrGetDslmDeviceInfo(const DeviceIdentify *device); 36 DslmDeviceInfo *GetDslmDeviceInfo(const DeviceIdentify *device); 40 bool IsSameDevice(const DeviceIdentify *first, const DeviceIdentify *second);
|
H A D | dslm_device_list.c | 61 DslmDeviceInfo *GetDslmDeviceInfo(const DeviceIdentify *device) in GetDslmDeviceInfo() 82 DslmDeviceInfo *CreatOrGetDslmDeviceInfo(const DeviceIdentify *device) in CreatOrGetDslmDeviceInfo() 107 if (memcpy_s(&info->identity, sizeof(DeviceIdentify), device, sizeof(DeviceIdentify)) != EOK) { in CreatOrGetDslmDeviceInfo() 126 bool IsSameDevice(const DeviceIdentify *first, const DeviceIdentify *second) in IsSameDevice()
|
/ohos5.0/base/security/security_guard/interfaces/inner_api/classify/test/unittest/src/ |
H A D | risk_classify_kit_test.cpp | 29 int32_t RequestSecurityEventInfoAsync(const DeviceIdentify *devId, const char *eventJson, 31 …int32_t RequestSecurityModelResultSync(const DeviceIdentify *devId, uint32_t modelId, SecurityMode… 78 DeviceIdentify deviceIdentify = {}; 98 DeviceIdentify deviceIdentify = {}; 133 DeviceIdentify deviceIdentify = {}; 147 DeviceIdentify deviceIdentify = {}; 161 DeviceIdentify deviceIdentify = {};
|
/ohos5.0/base/security/device_security_level/baselib/msglib/src/common/ |
H A D | messenger_device_status_manager.h | 38 bool MessengerGetDeviceOnlineStatus(const DeviceIdentify *devId, int32_t *level); 40 bool MessengerGetSelfDeviceIdentify(DeviceIdentify *devId, int32_t *level); 44 bool MessengerGetNetworkIdByDeviceIdentify(const DeviceIdentify *devId, char *networkId, uint32_t l… 46 bool MessengerGetDeviceIdentifyByNetworkId(const char *networkId, DeviceIdentify *devId);
|
H A D | messenger_impl.h | 29 void SendMsgToImpl(const Messenger *messenger, uint64_t transNo, const DeviceIdentify *devId, const… 34 bool GetDeviceOnlineStatusImpl(const Messenger *messenger, const DeviceIdentify *devId, int32_t *le… 36 bool GetSelfDeviceIdentifyImpl(const Messenger *messenger, DeviceIdentify *devId, int32_t *level); 40 bool GetDeviceStatisticInfoImpl(const Messenger *messenger, const DeviceIdentify *devId, StatisticI…
|
H A D | messenger.c | 34 void SendMsgTo(const Messenger *messenger, uint64_t transNo, const DeviceIdentify *devId, const uin… in SendMsgTo() 40 bool GetDeviceOnlineStatus(const Messenger *messenger, const DeviceIdentify *devId, int32_t *level) in GetDeviceOnlineStatus() 45 bool GetSelfDeviceIdentify(const Messenger *messenger, DeviceIdentify *devId, int32_t *level) in GetSelfDeviceIdentify() 55 bool GetDeviceStatisticInfo(const Messenger *messenger, const DeviceIdentify *devId, StatisticInfor… in GetDeviceStatisticInfo()
|
/ohos5.0/base/security/security_guard/interfaces/inner_api/common/include/ |
H A D | security_guard_api.h | 36 typedef struct DeviceIdentify { struct 39 } DeviceIdentify; argument 42 DeviceIdentify devId; 48 typedef void RequestSecurityEventInfoCallBack(const DeviceIdentify *devId, const char *eventBuffLis…
|
/ohos5.0/base/security/device_security_level/oem_property/include/ |
H A D | dslm_credential.h | 27 int32_t DefaultRequestDslmCred(const DeviceIdentify *device, const RequestObject *obj, DslmCredBuff… 29 int32_t DefaultVerifyDslmCred(const DeviceIdentify *device, uint64_t challenge, const DslmCredBuff … 36 int32_t VerifyOhosDslmCred(const DeviceIdentify *device, uint64_t challenge, const DslmCredBuff *cr… 39 int32_t RequestOhosDslmCred(const DeviceIdentify *device, const RequestObject *obj, DslmCredBuff **…
|
/ohos5.0/base/security/security_guard/interfaces/inner_api/obtaindata/src/ |
H A D | sg_obtaindata_client.cpp | 60 static int32_t RequestSecurityEventInfoAsyncImpl(const DeviceIdentify *devId, const char *eventJson, in RequestSecurityEventInfoAsyncImpl() 83 struct DeviceIdentify identity; in RequestSecurityEventInfoAsyncImpl() 84 (void) memset_s(&identity, sizeof(DeviceIdentify), 0, sizeof(DeviceIdentify)); in RequestSecurityEventInfoAsyncImpl() 101 int32_t RequestSecurityEventInfoAsync(const DeviceIdentify *devId, const char *eventJson, in RequestSecurityEventInfoAsync()
|
/ohos5.0/base/security/device_security_level/baselib/msglib/src/utils/ |
H A D | messenger_utils.h | 35 DeviceIdentify srcIdentity; 67 static inline bool IsSameDevice(const DeviceIdentify *left, const DeviceIdentify *right) in IsSameDevice() 84 QueueMsgData *CreateQueueMsgData(const DeviceIdentify *devId, const uint8_t *msg, uint32_t msgLen,
|
/ohos5.0/base/security/device_security_level/interfaces/inner_api/src/lite/ |
H A D | device_security_info.c | 29 int32_t RequestDeviceSecurityInfoAsyncImpl(const DeviceIdentify *identify, const RequestOption *opt… 32 static int32_t RequestDeviceSecurityInfoImpl(const DeviceIdentify *identify, const RequestOption *o… in RequestDeviceSecurityInfoImpl() 59 int32_t RequestDeviceSecurityInfo(const DeviceIdentify *identify, const RequestOption *option, in RequestDeviceSecurityInfo() 65 int32_t RequestDeviceSecurityInfoAsync(const DeviceIdentify *identify, const RequestOption *option, in RequestDeviceSecurityInfoAsync()
|