/base/security/device_auth/services/legacy/group_manager/inc/broadcast_manager/ |
H A D | broadcast_manager.h | 29 void (*postOnDeviceBound)(const char *peerUdid, const char *messageStr); 30 void (*postOnDeviceUnBound)(const char *peerUdid, const char *messageStr); 31 void (*postOnDeviceNotTrusted)(const char *peerUdid); 32 void (*postOnLastGroupDeleted)(const char *peerUdid, int groupType);
|
/base/security/device_auth/test/fuzztest/device_auth_service/devauthservregdatachangelistener_fuzzer/ |
H A D | devauthservregdatachangelistener_fuzzer.cpp | 27 static void OnDeviceBound(const char *peerUdid, const char *groupInfo) {} in OnDeviceBound() argument 29 static void OnDeviceUnBound(const char *peerUdid, const char *groupInfo) {} in OnDeviceUnBound() argument 31 static void OnDeviceNotTrusted(const char *peerUdid) {} in OnDeviceNotTrusted() argument 33 static void OnLastGroupDeleted(const char *peerUdid, int groupType) {} in OnLastGroupDeleted() argument
|
/base/security/device_auth/test/fuzztest/group_manage/registerdatachangelistener_fuzzer/ |
H A D | registerdatachangelistener_fuzzer.cpp | 23 void onDeviceBound(const char *peerUdid, const char *groupInfo) {} in onDeviceBound() argument 25 void onDeviceUnBound(const char *peerUdid, const char *groupInfo) {} in onDeviceUnBound() argument 27 void onDeviceNotTrusted(const char *peerUdid) {} in onDeviceNotTrusted() argument 29 void onLastGroupDeleted(const char *peerUdid, int groupType) {} in onLastGroupDeleted() argument
|
/base/security/device_auth/services/legacy/group_manager/src/broadcast_manager/ |
H A D | broadcast_manager.c | 72 static void PostOnDeviceBound(const char *peerUdid, const char *messageStr) in PostOnDeviceBound() argument 74 if ((peerUdid == NULL) || (messageStr == NULL)) { in PostOnDeviceBound() 75 LOGE("The peerUdid or messageStr is NULL!"); in PostOnDeviceBound() 84 entry->listener->onDeviceBound(peerUdid, messageStr); in PostOnDeviceBound() 90 static void PostOnDeviceUnBound(const char *peerUdid, const char *messageStr) in PostOnDeviceUnBound() argument 92 if ((peerUdid == NULL) || (messageStr == NULL)) { in PostOnDeviceUnBound() 93 LOGE("The peerUdid or messageStr is NULL!"); in PostOnDeviceUnBound() 102 entry->listener->onDeviceUnBound(peerUdid, messageStr); in PostOnDeviceUnBound() 108 static void PostOnDeviceNotTrusted(const char *peerUdid) in PostOnDeviceNotTrusted() argument 110 if (peerUdid in PostOnDeviceNotTrusted() 126 PostOnLastGroupDeleted(const char *peerUdid, int groupType) PostOnLastGroupDeleted() argument [all...] |
/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_related_group_auth/ |
H A D | account_related_group_auth.c | 268 static int32_t FillAccountCredentialInfo(int32_t osAccountId, const char *peerUdid, const char *groupId, in FillAccountCredentialInfo() argument 278 int32_t res = GaGetTrustedDeviceEntryById(osAccountId, peerUdid, true, groupId, peerDevInfo); in FillAccountCredentialInfo() 302 const char *peerUdid = GetStringFromJson(paramsData, FIELD_PEER_CONN_DEVICE_ID); in FillAccountAuthInfo() local 303 if (peerUdid == NULL) { in FillAccountAuthInfo() 327 return FillAccountCredentialInfo(osAccountId, peerUdid, groupId, localAuthInfo, paramsData); in FillAccountAuthInfo() 330 static bool IsDeviceImportedByCloud(int32_t osAccountId, const char *peerUdid, const char *groupId) in IsDeviceImportedByCloud() argument 337 if (GaGetTrustedDeviceEntryById(osAccountId, peerUdid, true, groupId, peerDeviceInfo) != HC_SUCCESS) { in IsDeviceImportedByCloud() 358 const char *peerUdid = GetStringFromJson(confirmationJson, FIELD_PEER_CONN_DEVICE_ID); in CombineAccountServerConfirms() local 359 if (peerUdid == NULL) { in CombineAccountServerConfirms() 363 if (AddStringToJson(dataFromClient, FIELD_PEER_CONN_DEVICE_ID, peerUdid) ! in CombineAccountServerConfirms() 578 const char *peerUdid = GetStringFromJson(dataFromClient, FIELD_PEER_CONN_DEVICE_ID); AddSelfDevInfoForServer() local 717 PrepareTrustedDeviceInfo(const char *peerUdid, const char *groupId, const CJson *out, TrustedDeviceEntry *devEntry) PrepareTrustedDeviceInfo() argument 760 const char *peerUdid = GetStringFromJson(authParam, FIELD_PEER_CONN_DEVICE_ID); AddTrustedDeviceForAccount() local [all...] |
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/ |
H A D | compatible_bind_sub_session.c | 184 const char *peerUdid = GetStringFromJson(jsonParams, FIELD_CONN_DEVICE_ID); in CheckServerStatusIfNotInvite() local 185 if (peerUdid == NULL) { in CheckServerStatusIfNotInvite() 186 LOGE("Failed to get peerUdid from jsonParams!"); in CheckServerStatusIfNotInvite() 199 result = CheckDeviceNumLimit(osAccountId, groupId, peerUdid); in CheckServerStatusIfNotInvite() 277 static int32_t InformSelfBindSuccess(const char *peerAuthId, const char *peerUdid, const char *groupId, in InformSelfBindSuccess() argument 289 int32_t result = GenerateBindSuccessData(peerAuthId, peerUdid, groupId, &jsonDataStr); in InformSelfBindSuccess() 456 static int32_t AddPeerDevToGroup(const char *peerAuthId, const char *peerUdid, in AddPeerDevToGroup() argument 461 int32_t result = AddTrustDevToDatabase(session->osAccountId, peerAuthId, peerUdid, groupId, peerUserType); in AddPeerDevToGroup() 470 static int32_t AddGroupAndDev(const char *peerAuthId, const char *peerUdid, const char *groupId, in AddGroupAndDev() argument 477 result = AddPeerDevToGroup(peerAuthId, peerUdid, groupI in AddGroupAndDev() 484 HandleBindSuccess(const char *peerAuthId, const char *peerUdid, const char *groupId, const CompatibleBindSubSession *session, CJson *out) HandleBindSuccess() argument 506 const char *peerUdid = GetStringFromJson(jsonParams, FIELD_CONN_DEVICE_ID); OnBindFinish() local [all...] |
H A D | compatible_bind_sub_session_common.c | 403 const char *peerUdid = GetStringFromJson(jsonParams, FIELD_PEER_UDID); in AddPeerAuthIdAndUdidIfExist() local 404 if (peerUdid != NULL && AddStringToJson(session->params, FIELD_PEER_UDID, peerUdid) != HC_SUCCESS) { in AddPeerAuthIdAndUdidIfExist() 405 LOGE("Failed to add peerUdid to params!"); in AddPeerAuthIdAndUdidIfExist()
|
/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_unrelated_group_auth/ |
H A D | account_unrelated_group_auth.c | 97 const char *peerUdid = GetStringFromJson(authParam, FIELD_PEER_CONN_DEVICE_ID); in AddPeerUdidToSelfData() local 98 if (peerUdid == NULL) { in AddPeerUdidToSelfData() 99 LOGD("The input has no peerUdid in authParam!"); in AddPeerUdidToSelfData() 102 if (AddStringToJson(returnToSelf, FIELD_PEER_CONN_DEVICE_ID, peerUdid) != HC_SUCCESS) { in AddPeerUdidToSelfData() 345 const char *peerUdid = GetStringFromJson(paramsData, FIELD_PEER_CONN_DEVICE_ID); in FillNonAccountAuthInfo() local 350 if (peerUdid != NULL) { in FillNonAccountAuthInfo() 351 res = GaGetTrustedDeviceEntryById(osAccountId, peerUdid, true, groupId, peerAuthInfo); in FillNonAccountAuthInfo() 393 const char *peerUdid = GetStringFromJson(confirmationJson, FIELD_PEER_CONN_DEVICE_ID); in CombineDasServerConfirmParams() local 394 if (peerUdid != NULL) { in CombineDasServerConfirmParams() 395 if (AddStringToJson(dataFromClient, FIELD_PEER_CONN_DEVICE_ID, peerUdid) ! in CombineDasServerConfirmParams() [all...] |
/base/security/device_auth/interfaces/inner_api/ |
H A D | device_auth.h | 43 #define FIELD_PEER_UDID "peerUdid" 193 void (*onDeviceBound)(const char *peerUdid, const char *groupInfo); 195 void (*onDeviceUnBound)(const char *peerUdid, const char *groupInfo); 197 void (*onDeviceNotTrusted)(const char *peerUdid); 199 void (*onLastGroupDeleted)(const char *peerUdid, int groupType);
|
/base/security/device_auth/services/legacy/group_auth/inc/ |
H A D | group_auth_data_operation.h | 28 bool GaIsDeviceInGroup(int32_t groupType, int32_t osAccountId, const char *peerUdid, const char *peerAuthId,
|
/base/security/device_auth/services/mk_agree/inc/ |
H A D | mk_agree_task.h | 51 char *peerUdid; member
|
/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/group_auth_common/ |
H A D | group_auth_data_operation.c | 182 bool GaIsDeviceInGroup(int32_t groupType, int32_t osAccountId, const char *peerUdid, const char *peerAuthId, in GaIsDeviceInGroup() argument 196 if (peerUdid != NULL) { in GaIsDeviceInGroup() 197 res = GaGetTrustedDeviceEntryById(osAccountId, peerUdid, true, groupId, deviceEntry); in GaIsDeviceInGroup()
|
/base/security/device_auth/services/legacy/group_manager/inc/ |
H A D | group_operation_common.h | 40 int32_t AssertPeerDeviceNotSelf(const char *peerUdid); 43 int32_t CheckDeviceNumLimit(int32_t osAccountId, const char *groupId, const char *peerUdid); 77 int32_t GenerateBindSuccessData(const char *peerAuthId, const char *peerUdid, const char *groupId,
|
/base/security/device_auth/services/mk_agree/src/ |
H A D | mk_agree_task.c | 160 res = GenerateAndSavePseudonymId(pakeTask->taskBase.osAccountId, pakeTask->taskBase.peerUdid, in ComputeKcfData() 308 res = GenerateMk(pakeTask->taskBase.osAccountId, pakeTask->taskBase.peerUdid, &peerPkBuff); in GenerateMkByPeer() 322 res = GeneratePseudonymPsk(pakeTask->taskBase.osAccountId, pakeTask->taskBase.peerUdid, &saltBuff); in GenerateMkByPeer() 560 int32_t res = GetDuplicateUdid(in, &task->peerUdid); in ProcessPakeMkAgreeTask() 592 HcFree(task->peerUdid); in DestroyPakeMkAgreeTask() 593 task->peerUdid = NULL; in DestroyPakeMkAgreeTask()
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_auth_sub_session/ |
H A D | compatible_auth_sub_session_common.c | 176 static int32_t AddUpgradeFlagToParams(CJson *paramsData, int32_t osAccountId, const char *peerUdid, in AddUpgradeFlagToParams() argument 185 if (peerUdid != NULL) { in AddUpgradeFlagToParams() 186 res = GaGetTrustedDeviceEntryById(osAccountId, peerUdid, true, groupId, peerDeviceEntry); in AddUpgradeFlagToParams() 231 const char *peerUdid = GetStringFromJson(param, FIELD_PEER_CONN_DEVICE_ID); in FillAuthParams() local 247 if (!GaIsDeviceInGroup(groupInfo->type, osAccountId, peerUdid, peerAuthId, groupId)) { in FillAuthParams() 256 AddUpgradeFlagToParams(paramsData, osAccountId, peerUdid, peerAuthId, groupId) != HC_SUCCESS) { in FillAuthParams()
|
/base/security/device_auth/frameworks/src/lite/ |
H A D | ipc_adapt.c | 1072 void IpcOnDeviceBound(const char *peerUdid, const char *groupInfo) in IpcOnDeviceBound() argument 1079 if ((peerUdid == NULL) || (groupInfo == NULL)) { in IpcOnDeviceBound() 1096 ret = EncodeCallData(dataParcel, PARAM_TYPE_UDID, (const uint8_t *)(peerUdid), HcStrlen(peerUdid) + 1); in IpcOnDeviceBound() 1120 void IpcOnDeviceUnBound(const char *peerUdid, const char *groupInfo) in IpcOnDeviceUnBound() argument 1127 if ((peerUdid == NULL) || (groupInfo == NULL)) { in IpcOnDeviceUnBound() 1144 ret = EncodeCallData(dataParcel, PARAM_TYPE_UDID, (const uint8_t *)(peerUdid), HcStrlen(peerUdid) + 1); in IpcOnDeviceUnBound() 1168 void IpcOnDeviceNotTrusted(const char *peerUdid) in IpcOnDeviceNotTrusted() argument 1175 if (peerUdid in IpcOnDeviceNotTrusted() 1215 IpcOnLastGroupDeleted(const char *peerUdid, int32_t groupType) IpcOnLastGroupDeleted() argument [all...] |
/base/security/device_auth/frameworks/src/standard/ |
H A D | ipc_adapt.cpp | 1023 void IpcOnDeviceBound(const char *peerUdid, const char *groupInfo) in IpcOnDeviceBound() argument 1037 if ((peerUdid == nullptr) || (groupInfo == nullptr)) { in IpcOnDeviceBound() 1043 reinterpret_cast<const uint8_t *>(peerUdid), HcStrlen(peerUdid) + 1); in IpcOnDeviceBound() 1064 void IpcOnDeviceUnBound(const char *peerUdid, const char *groupInfo) in IpcOnDeviceUnBound() argument 1078 if ((peerUdid == nullptr) || (groupInfo == nullptr)) { in IpcOnDeviceUnBound() 1084 reinterpret_cast<const uint8_t *>(peerUdid), HcStrlen(peerUdid) + 1); in IpcOnDeviceUnBound() 1105 void IpcOnDeviceNotTrusted(const char *peerUdid) in IpcOnDeviceNotTrusted() argument 1119 if (peerUdid in IpcOnDeviceNotTrusted() 1144 IpcOnLastGroupDeleted(const char *peerUdid, int32_t groupType) IpcOnLastGroupDeleted() argument [all...] |
/base/security/device_auth/services/ |
H A D | device_auth.c | 838 const char *peerUdid = GetPeerUdidFromJson(osAccountId, context); in BuildClientAuthContext() local 839 if (peerUdid != NULL) { in BuildClientAuthContext() 841 if (DeepCopyString(peerUdid, &deviceId) != HC_SUCCESS) { in BuildClientAuthContext() 842 LOGE("Failed to copy peerUdid!"); in BuildClientAuthContext() 846 LOGE("add peerUdid to context fail."); in BuildClientAuthContext() 959 static int32_t AddDeviceIdToJson(CJson *context, const char *peerUdid) in AddDeviceIdToJson() argument 962 if (DeepCopyString(peerUdid, &deviceId) != HC_SUCCESS) { in AddDeviceIdToJson() 963 LOGE("Failed to copy peerUdid!"); in AddDeviceIdToJson() 967 LOGE("add peerUdid to context fail."); in AddDeviceIdToJson() 992 const char *peerUdid in BuildServerAuthContext() local 1034 const char *peerUdid = GetStringFromJson(context, FIELD_PEER_CONN_DEVICE_ID); BuildServerP2PAuthContext() local [all...] |
/base/security/device_auth/services/legacy/group_manager/src/group_operation/group_operation_common/ |
H A D | group_operation_common.c | 464 int32_t CheckDeviceNumLimit(int32_t osAccountId, const char *groupId, const char *peerUdid) in CheckDeviceNumLimit() argument 471 if ((peerUdid != NULL) && (IsTrustedDeviceInGroup(osAccountId, groupId, peerUdid, true))) { in CheckDeviceNumLimit() 772 int32_t AssertPeerDeviceNotSelf(const char *peerUdid) in AssertPeerDeviceNotSelf() argument 774 if (peerUdid == NULL) { in AssertPeerDeviceNotSelf() 775 LOGE("The input peerUdid is NULL!"); in AssertPeerDeviceNotSelf() 784 if (strcmp(peerUdid, udid) == 0) { in AssertPeerDeviceNotSelf() 928 int32_t GenerateBindSuccessData(const char *peerAuthId, const char *peerUdid, in GenerateBindSuccessData() argument 931 if ((peerAuthId == NULL) || (peerUdid == NULL) || (groupId == NULL) || (returnDataStr == NULL)) { in GenerateBindSuccessData() 937 PRINT_SENSITIVE_DATA("PeerUdid", peerUdid); in GenerateBindSuccessData() [all...] |
/base/security/device_auth/services/session_manager/src/session/v2/ |
H A D | dev_session_util.c | 225 const char *peerUdid = GetStringFromJson(context, FIELD_PEER_UDID); in SetPeerAuthIdByDb() local 226 if (peerUdid == NULL) { in SetPeerAuthIdByDb() 230 TrustedDeviceEntry *entry = GetDeviceEntryById(osAccountId, peerUdid, true, groupId); in SetPeerAuthIdByDb()
|
/base/security/device_auth/frameworks/src/ |
H A D | ipc_service.c | 715 const char *peerUdid = NULL; in IpcServiceGmGetRelatedGroups() local 730 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_UDID, (uint8_t *)&peerUdid, NULL); in IpcServiceGmGetRelatedGroups() 731 if ((peerUdid == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetRelatedGroups() 736 callRet = g_devGroupMgrMethod.getRelatedGroups(osAccountId, appId, peerUdid, &outGroups, &groupNum); in IpcServiceGmGetRelatedGroups() 757 const char *peerUdid = NULL; in IpcServiceGmGetDeviceInfoById() local 773 ret = GetIpcRequestParamByType(ipcParams, paramNum, PARAM_TYPE_UDID, (uint8_t *)&peerUdid, NULL); in IpcServiceGmGetDeviceInfoById() 774 if ((peerUdid == NULL) || (ret != HC_SUCCESS)) { in IpcServiceGmGetDeviceInfoById() 784 callRet = g_devGroupMgrMethod.getDeviceInfoById(osAccountId, appId, peerUdid, groupId, &outDevInfo); in IpcServiceGmGetDeviceInfoById()
|
H A D | ipc_sdk.c | 1084 static int32_t IpcGmGetRelatedGroups(int32_t osAccountId, const char *appId, const char *peerUdid, in IpcGmGetRelatedGroups() argument 1092 if (IsStrInvalid(appId) || IsStrInvalid(peerUdid) || (outGroupVec == NULL) || (groupNum == NULL)) { in IpcGmGetRelatedGroups() 1113 ret = SetCallRequestParamInfo(callCtx, PARAM_TYPE_UDID, (const uint8_t *)peerUdid, HcStrlen(peerUdid) + 1); in IpcGmGetRelatedGroups() 1160 const char *peerUdid, const char *groupId, uintptr_t callCtx) in FormParamsForGettingDeviceInfo() 1175 ret = SetCallRequestParamInfo(callCtx, PARAM_TYPE_UDID, (const uint8_t *)peerUdid, HcStrlen(peerUdid) + 1); in FormParamsForGettingDeviceInfo() 1188 static int32_t IpcGmGetDeviceInfoById(int32_t osAccountId, const char *appId, const char *peerUdid, const char *groupId, in IpcGmGetDeviceInfoById() argument 1197 if (IsStrInvalid(appId) || IsStrInvalid(peerUdid) || IsStrInvalid(groupId) || (outDevInfo == NULL)) { in IpcGmGetDeviceInfoById() 1206 ret = FormParamsForGettingDeviceInfo(osAccountId, appId, peerUdid, groupI in IpcGmGetDeviceInfoById() 1159 FormParamsForGettingDeviceInfo(int32_t osAccountId, const char *appId, const char *peerUdid, const char *groupId, uintptr_t callCtx) FormParamsForGettingDeviceInfo() argument [all...] |
/base/security/device_auth/test/unittest/deviceauth/source/ |
H A D | deviceauth_interface_test.cpp | 761 static void OnDeviceBound(const char *peerUdid, const char *groupInfo) in OnDeviceBound() argument 763 (void)peerUdid; in OnDeviceBound() 767 static void OnDeviceUnBound(const char *peerUdid, const char *groupInfo) in OnDeviceUnBound() argument 769 (void)peerUdid; in OnDeviceUnBound() 773 static void OnDeviceNotTrusted(const char *peerUdid) in OnDeviceNotTrusted() argument 775 (void)peerUdid; in OnDeviceNotTrusted() 778 static void OnLastGroupDeleted(const char *peerUdid, int groupType) in OnLastGroupDeleted() argument 780 (void)peerUdid; in OnLastGroupDeleted()
|
H A D | device_auth_ipc_test.cpp | 241 static void OnDeviceBound(const char *peerUdid, const char *groupInfo) in OnDeviceBound() argument 243 (void)peerUdid; in OnDeviceBound() 248 static void OnDeviceUnBound(const char *peerUdid, const char *groupInfo) in OnDeviceUnBound() argument 250 (void)peerUdid; in OnDeviceUnBound() 255 static void OnDeviceNotTrusted(const char *peerUdid) in OnDeviceNotTrusted() argument 257 (void)peerUdid; in OnDeviceNotTrusted() 261 static void OnLastGroupDeleted(const char *peerUdid, int groupType) in OnLastGroupDeleted() argument 263 (void)peerUdid; in OnLastGroupDeleted()
|
/base/security/device_auth/test/fuzztest/devauthfunc_fuzzer/ |
H A D | devauthfunc_fuzzer.cpp | 192 static void OnDeviceBound(const char *peerUdid, const char* groupInfo) {} in OnDeviceBound() argument 194 static void OnDeviceUnBound(const char *peerUdid, const char* groupInfo) {} in OnDeviceUnBound() argument 196 static void OnDeviceNotTrusted(const char *peerUdid) {} in OnDeviceNotTrusted() argument 198 static void OnLastGroupDeleted(const char *peerUdid, int groupType) {} in OnLastGroupDeleted() argument
|