/base/security/device_auth/services/legacy/group_manager/inc/ |
H A D | group_operation_common.h | 34 int32_t ProcessKeyPair(int32_t osAccountId, int action, const CJson *jsonParams, const char *groupId); 39 int32_t AssertSameGroupNotExist(int32_t osAccountId, const char *groupId); 41 int32_t CheckGroupExist(int32_t osAccountId, const char *groupId); 43 int32_t CheckDeviceNumLimit(int32_t osAccountId, const char *groupId, const char *peerUdid); 47 int32_t CheckPermForGroup(int32_t osAccountId, int actionType, const char *callerPkgName, const char *groupId); 50 int32_t AddGroupIdToParams(const char *groupId, TrustedGroupEntry *groupParams); 65 int32_t AddServiceTypeToParams(const char *groupId, TrustedDeviceEntry *devParams); 66 int32_t AddGroupIdToDevParams(const char *groupId, TrustedDeviceEntry *devParams); 70 const char *, TrustedGroupEntry*), const CJson *jsonParams, const char *groupId); 72 TrustedDeviceEntry*), const CJson *jsonParams, const char *groupId); [all...] |
H A D | group_manager.h | 39 int32_t CheckAccessToGroupImpl(int32_t osAccountId, const char *appId, const char *groupId); 40 int32_t GetGroupInfoByIdImpl(int32_t osAccountId, const char *appId, const char *groupId, char **returnGroupInfo); 47 int32_t GetDeviceInfoByIdImpl(int32_t osAccountId, const char *appId, const char *deviceId, const char *groupId, 49 int32_t GetTrustedDevicesImpl(int32_t osAccountId, const char *appId, const char *groupId, 51 bool IsDeviceInGroupImpl(int32_t osAccountId, const char *appId, const char *groupId, const char *deviceId);
|
H A D | group_operation.h | 40 int32_t (*checkAccessToGroup)(int32_t osAccountId, const char *appId, const char *groupId); 41 int32_t (*getAccessibleGroupInfoById)(int32_t osAccountId, const char *appId, const char *groupId, 50 const DeviceQueryParams *devQueryParams, const char *groupId, char **returnDeviceInfo); 51 int32_t (*getAccessibleTrustedDevices)(int32_t osAccountId, const char *appId, const char *groupId, 53 bool (*isDeviceInAccessibleGroup)(int32_t osAccountId, const char *appId, const char *groupId,
|
/base/security/device_auth/services/legacy/group_manager/src/group_operation/peer_to_peer_group/ |
H A D | peer_to_peer_group.c | 66 /* peer to peer group: groupId = sha256(groupName | appId) */ in GenerateGroupId() 85 LOGE("Failed to get hash for groupId! [AppId]: %s, [GroupName]: %s", appId, groupName); in GenerateGroupId() 107 LOGE("Failed to generate groupId! [GroupName]: %s, [AppId]: %s", groupName, appId); in GeneratePeerToPeerGroupId() 131 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry *groupParams) in GenerateGroupParams() argument 146 ((result = AddGroupIdToParams(groupId, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 155 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *devParams) in GenerateDevParams() argument 162 ((result = AddGroupIdToDevParams(groupId, devParams)) != HC_SUCCESS) || in GenerateDevParams() 163 ((result = AddServiceTypeToParams(groupId, devParams)) != HC_SUCCESS)) { in GenerateDevParams() 171 char *groupId = NULL; in CreateGroupInner() local 174 ((result = GeneratePeerToPeerGroupId(jsonParams, &groupId)) ! in CreateGroupInner() 186 GetPeerDevUserTypeFromDb(int32_t osAccountId, const char *groupId, const char *peerAuthId) GetPeerDevUserTypeFromDb() argument 204 DelPeerDevAndKeyInfo(int32_t osAccountId, const char *groupId, const char *peerAuthId) DelPeerDevAndKeyInfo() argument 241 DelAllPeerDevAndKeyInfo(int32_t osAccountId, const char *groupId) DelAllPeerDevAndKeyInfo() argument 268 AddAuthIdAndUserTypeToParams(int32_t osAccountId, const char *groupId, CJson *jsonParams) AddAuthIdAndUserTypeToParams() argument 304 DelGroupAndSelfKeyInfo(int32_t osAccountId, const char *groupId, CJson *jsonParams) DelGroupAndSelfKeyInfo() argument 334 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); HandleLocalUnbind() local 363 CheckPeerDeviceStatus(int32_t osAccountId, const char *groupId, const CJson *jsonParams) CheckPeerDeviceStatus() argument 389 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); CheckDeletePeerStatus() local 433 char *groupId = NULL; CreateGroup() local 455 const char *groupId = NULL; DeleteGroup() local [all...] |
/base/security/device_auth/services/legacy/group_manager/src/group_operation/group_operation_common/ |
H A D | group_operation_common.c | 116 const char *groupId = StringGet(&(groupEntry->id)); in CheckAndRemoveUpgradeGroupEntry() local 120 if (groupId == NULL || groupOwner == NULL) { in CheckAndRemoveUpgradeGroupEntry() 121 LOGW("groupId or groupOwner is null, not need to remove!"); in CheckAndRemoveUpgradeGroupEntry() 140 if (DelGroupFromDb(UPGRADE_OS_ACCOUNT_ID, groupId) != HC_SUCCESS) { in CheckAndRemoveUpgradeGroupEntry() 148 const char *groupId) in GetTrustedDeviceEntryById() 152 params.groupId = groupId; in GetTrustedDeviceEntryById() 174 TrustedGroupEntry *GetGroupEntryById(int32_t osAccountId, const char *groupId) in GetGroupEntryById() argument 176 if (groupId == NULL) { in GetGroupEntryById() 177 LOGE("The input groupId i in GetGroupEntryById() 147 GetTrustedDeviceEntryById(int32_t osAccountId, const char *deviceId, bool isUdid, const char *groupId) GetTrustedDeviceEntryById() argument 199 IsTrustedDeviceInGroup(int32_t osAccountId, const char *groupId, const char *deviceId, bool isUdid) IsTrustedDeviceInGroup() argument 239 IsGroupOwner(int32_t osAccountId, const char *groupId, const char *appId) IsGroupOwner() argument 266 IsGroupExistByGroupId(int32_t osAccountId, const char *groupId) IsGroupExistByGroupId() argument 280 CheckGroupAccessible(int32_t osAccountId, const char *groupId, const char *appId) CheckGroupAccessible() argument 301 CheckGroupEditAllowed(int32_t osAccountId, const char *groupId, const char *appId) CheckGroupEditAllowed() argument 372 GetTrustedDevInfoById(int32_t osAccountId, const char *deviceId, bool isUdid, const char *groupId, TrustedDeviceEntry *returnDeviceEntry) GetTrustedDevInfoById() argument 389 GetTrustedDevices(int32_t osAccountId, const char *groupId, DeviceEntryVec *returnDeviceEntryVec) GetTrustedDevices() argument 443 GetCurDeviceNumByGroupId(int32_t osAccountId, const char *groupId) GetCurDeviceNumByGroupId() argument 464 CheckDeviceNumLimit(int32_t osAccountId, const char *groupId, const char *peerUdid) CheckDeviceNumLimit() argument 551 AddGroupIdToParams(const char *groupId, TrustedGroupEntry *groupParams) AddGroupIdToParams() argument 719 AddServiceTypeToParams(const char *groupId, TrustedDeviceEntry *devParams) AddServiceTypeToParams() argument 728 AddGroupIdToDevParams(const char *groupId, TrustedDeviceEntry *devParams) AddGroupIdToDevParams() argument 763 AssertSameGroupNotExist(int32_t osAccountId, const char *groupId) AssertSameGroupNotExist() argument 791 CheckGroupExist(int32_t osAccountId, const char *groupId) CheckGroupExist() argument 804 AddGroupToDatabaseByJson(int32_t osAccountId, int32_t (*generateGroupParams)(const CJson*, const char *, TrustedGroupEntry*), const CJson *jsonParams, const char *groupId) AddGroupToDatabaseByJson() argument 831 AddDeviceToDatabaseByJson(int32_t osAccountId, int32_t (*generateDevParams)(const CJson*, const char*, TrustedDeviceEntry*), const CJson *jsonParams, const char *groupId) AddDeviceToDatabaseByJson() argument 858 DelGroupFromDb(int32_t osAccountId, const char *groupId) DelGroupFromDb() argument 881 DelDeviceFromDb(int32_t osAccountId, const char *groupId, const TrustedDeviceEntry *deviceEntry) DelDeviceFromDb() argument 903 ConvertGroupIdToJsonStr(const char *groupId, char **returnJsonStr) ConvertGroupIdToJsonStr() argument 928 GenerateBindSuccessData(const char *peerAuthId, const char *peerUdid, const char *groupId, char **returnDataStr) GenerateBindSuccessData() argument 963 GenerateUnbindSuccessData(const char *peerAuthId, const char *groupId, char **returnDataStr) GenerateUnbindSuccessData() argument 996 ProcessKeyPair(int32_t osAccountId, int action, const CJson *jsonParams, const char *groupId) ProcessKeyPair() argument 1044 GetGroupTypeFromDb(int32_t osAccountId, const char *groupId, uint32_t *returnGroupType) GetGroupTypeFromDb() argument 1088 GetGroupIdFromJson(const CJson *jsonParams, const char **groupId) GetGroupIdFromJson() argument 1125 CheckPermForGroup(int32_t osAccountId, int actionType, const char *callerPkgName, const char *groupId) CheckPermForGroup() argument [all...] |
/base/security/device_auth/services/legacy/group_manager/src/group_operation/across_account_group/ |
H A D | across_account_group.c | 52 /* across account group: groupId = sha256(userId1 | userId2) */ in GenerateGroupId() 77 LOGE("Failed to get hash for groupId!"); in GenerateGroupId() 122 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *devParams) in GenerateDevParams() argument 131 ((result = AddGroupIdToDevParams(groupId, devParams)) != HC_SUCCESS) || in GenerateDevParams() 132 ((result = AddServiceTypeToParams(groupId, devParams)) != HC_SUCCESS)) { in GenerateDevParams() 138 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry *groupParams) in GenerateGroupParams() argument 147 ((result = AddGroupNameToParams(groupId, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 148 ((result = AddGroupIdToParams(groupId, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 176 LOGE("Failed to generate groupId!"); in GenerateAcrossAccountGroupId() 328 static int32_t DelGroupAndTokens(int32_t osAccountId, const char *groupId) in DelGroupAndTokens() argument 340 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); CheckChangeParams() local 356 DelDeviceById(int32_t osAccountId, const char *groupId, const char *deviceId, bool isUdid) DelDeviceById() argument 368 GenerateTrustedDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *devParams) GenerateTrustedDevParams() argument 396 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); AddDeviceAndToken() local 424 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); DelPeerDeviceAndToken() local 458 AddGroupAndLocalDev(int32_t osAccountId, CJson *jsonParams, const char *groupId) AddGroupAndLocalDev() argument 486 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); CheckUserIdValid() local 531 char *groupId = NULL; CreateGroup() local 555 const char *groupId = NULL; DeleteGroup() local [all...] |
/base/security/device_auth/services/legacy/group_manager/src/group_operation/identical_account_group/ |
H A D | identical_account_group.c | 30 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *devParams) in GenerateDevParams() argument 39 ((result = AddGroupIdToDevParams(groupId, devParams)) != HC_SUCCESS) || in GenerateDevParams() 40 ((result = AddServiceTypeToParams(groupId, devParams)) != HC_SUCCESS)) { in GenerateDevParams() 46 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry *groupParams) in GenerateGroupParams() argument 55 ((result = AddGroupNameToParams(groupId, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 56 ((result = AddGroupIdToParams(groupId, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 72 /* identical account group: groupId = sha256(userId) */ in GenerateGroupId() 80 LOGE("Failed to copy userId for groupId!"); in GenerateGroupId() 98 LOGE("Failed to generate groupId!"); in GenerateIdenticalGroupId() 133 static int32_t DelDeviceById(int32_t osAccountId, const char *groupId, cons argument 280 DelAcrossAccountGroupAndTokens(int32_t osAccountId, const char *groupId) DelAcrossAccountGroupAndTokens() argument 290 GetRelatedAcrossAccountGroups(int32_t osAccountId, const char *groupId, GroupEntryVec *vec) GetRelatedAcrossAccountGroups() argument 305 DelRelatedAcrossAccountGroups(int32_t osAccountId, const char *groupId) DelRelatedAcrossAccountGroups() argument 321 DelGroupAndTokens(int32_t osAccountId, const char *groupId) DelGroupAndTokens() argument 337 GenerateTrustedDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *devParams) GenerateTrustedDevParams() argument 365 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); AddDeviceAndToken() local 393 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); DelPeerDevice() local 436 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); CheckChangeParams() local 452 AddGroupAndToken(int32_t osAccountId, CJson *jsonParams, const char *groupId) AddGroupAndToken() argument 488 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); CheckUserIdValid() local 533 char *groupId = NULL; CreateGroup() local 556 const char *groupId = NULL; DeleteGroup() local 568 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); UpdateTrustedDeviceForMetaNode() local [all...] |
/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/group_auth_common/ |
H A D | group_auth_data_operation.c | 29 if (!StringSet(&returnEntry->groupId, entry->groupId)) { in GaDeepCopyDeviceEntry() 69 LOGE("[GA]: Failed to copy groupId!"); in GaDeepCopyGroupEntry() 93 static int32_t GetGroupEntryById(int32_t osAccountId, const char *groupId, TrustedGroupEntry *returnEntry) in GetGroupEntryById() argument 99 groupParams.groupId = groupId; in GetGroupEntryById() 122 bool GaIsGroupAccessible(int32_t osAccountId, const char *groupId, const char *appId) in GaIsGroupAccessible() argument 124 if ((groupId == NULL) || (appId == NULL)) { in GaIsGroupAccessible() 125 LOGE("The input groupId or appId is NULL!"); in GaIsGroupAccessible() 133 int32_t res = GetGroupEntryById(osAccountId, groupId, entr in GaIsGroupAccessible() 143 GaGetTrustedDeviceEntryById(int32_t osAccountId, const char *deviceId, bool isUdid, const char *groupId, TrustedDeviceEntry *returnDeviceEntry) GaGetTrustedDeviceEntryById() argument 182 GaIsDeviceInGroup(int32_t groupType, int32_t osAccountId, const char *peerUdid, const char *peerAuthId, const char *groupId) GaIsDeviceInGroup() argument 211 GaGetLocalDeviceInfo(int32_t osAccountId, const char *groupId, TrustedDeviceEntry *localAuthInfo) GaGetLocalDeviceInfo() argument [all...] |
/base/security/device_auth/services/legacy/group_auth/inc/ |
H A D | group_auth_data_operation.h | 25 bool GaIsGroupAccessible(int32_t osAccountId, const char *groupId, const char *appId); 27 bool isUdid, const char *groupId, TrustedDeviceEntry *returnDeviceEntry); 29 const char *groupId); 30 int32_t GaGetLocalDeviceInfo(int32_t osAccountId, const char *groupId, TrustedDeviceEntry *localAuthInfo);
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/ |
H A D | compatible_bind_sub_session_common.c | 48 static int32_t AddGroupId(const char *groupId, CJson *params) in AddGroupId() argument 50 if (AddStringToJson(params, FIELD_GROUP_ID, groupId) != HC_SUCCESS) { in AddGroupId() 51 LOGE("Failed to add groupId to params!"); in AddGroupId() 129 static int32_t AddGroupInfoToSessionParams(const char *groupId, const CJson *jsonParams, CJson *params) in AddGroupInfoToSessionParams() argument 132 if (((result = AddGroupId(groupId, params)) != HC_SUCCESS) || in AddGroupInfoToSessionParams() 143 static int32_t CheckAuthIdAndUserTypeValid(int32_t osAccountId, int userType, const char *groupId, const char *authId) in CheckAuthIdAndUserTypeValid() argument 145 if (!IsGroupExistByGroupId(osAccountId, groupId)) { in CheckAuthIdAndUserTypeValid() 159 int32_t result = GetTrustedDevInfoById(osAccountId, udid, true, groupId, deviceInfo); in CheckAuthIdAndUserTypeValid() 175 static int32_t AddAuthIdAndUserTypeIfValidOrDefault(int32_t osAccountId, const char *groupId, const CJson *jsonParams, in AddAuthIdAndUserTypeIfValidOrDefault() argument 195 int32_t result = CheckAuthIdAndUserTypeValid(osAccountId, userType, groupId, authI in AddAuthIdAndUserTypeIfValidOrDefault() 240 AddDevInfoToSessionParams(int32_t osAccountId, const char *groupId, const CJson *jsonParams, CJson *params) AddDevInfoToSessionParams() argument 252 GenerateParamsByInput(int32_t osAccountId, const char *groupId, const CJson *jsonParams, CJson *params) GenerateParamsByInput() argument 278 AddGroupInfoByDatabase(int32_t osAccountId, const char *groupId, CJson *params) AddGroupInfoByDatabase() argument 311 AddDevInfoByDatabase(int32_t osAccountId, const char *groupId, CJson *params) AddDevInfoByDatabase() argument 339 GenerateParamsByDatabase(int32_t osAccountId, const char *groupId, CJson *params) GenerateParamsByDatabase() argument 348 AddSelfUpgradeFlag(CJson *params, bool isClient, int32_t osAccountId, const char *groupId, int32_t operationCode) AddSelfUpgradeFlag() argument 379 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); AddGroupAndDevInfo() local 413 const char *groupId = GetStringFromJson(session->params, FIELD_GROUP_ID); AddGroupAndDevInfoToParams() local 509 const char *groupId = GetStringFromJson(session->params, FIELD_GROUP_ID); AddGroupInfoToSendData() local [all...] |
H A D | compatible_bind_sub_session.c | 34 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); in CheckInvitePeer() local 35 if (groupId == NULL) { in CheckInvitePeer() 36 LOGE("Failed to get groupId from jsonParams!"); in CheckInvitePeer() 52 if (((result = CheckGroupExist(osAccountId, groupId)) != HC_SUCCESS) || in CheckInvitePeer() 53 ((result = GetGroupTypeFromDb(osAccountId, groupId, &groupType)) != HC_SUCCESS) || in CheckInvitePeer() 55 ((result = CheckPermForGroup(osAccountId, MEMBER_INVITE, appId, groupId)) != HC_SUCCESS) || in CheckInvitePeer() 56 ((result = CheckDeviceNumLimit(osAccountId, groupId, NULL)) != HC_SUCCESS)) { in CheckInvitePeer() 155 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); in GenerateKeyPairIfNeeded() local 156 if (groupId == NULL) { in GenerateKeyPairIfNeeded() 157 LOGE("Failed to get groupId fro in GenerateKeyPairIfNeeded() 174 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); CheckServerStatusIfNotInvite() local 277 InformSelfBindSuccess(const char *peerAuthId, const char *peerUdid, const char *groupId, const CompatibleBindSubSession *session, CJson *out) InformSelfBindSuccess() argument 302 const char *groupId = GetStringFromJson(params, FIELD_GROUP_ID); SetGroupId() local 402 GenerateDevAuthParams(const char *authId, const char *udid, const char *groupId, int userType, TrustedDeviceEntry *devAuthParams) GenerateDevAuthParams() argument 413 AddTrustDevToDatabase(int32_t osAccountId, const char *authId, const char *udid, const char *groupId, int userType) AddTrustDevToDatabase() argument 431 AddGroupAndLocalDevIfNotExist(const char *groupId, const CompatibleBindSubSession *session) AddGroupAndLocalDevIfNotExist() argument 456 AddPeerDevToGroup(const char *peerAuthId, const char *peerUdid, const char *groupId, const CompatibleBindSubSession *session) AddPeerDevToGroup() argument 470 AddGroupAndDev(const char *peerAuthId, const char *peerUdid, const char *groupId, const CompatibleBindSubSession *session) AddGroupAndDev() argument 484 HandleBindSuccess(const char *peerAuthId, const char *peerUdid, const char *groupId, const CompatibleBindSubSession *session, CJson *out) HandleBindSuccess() argument 514 const char *groupId = GetStringFromJson(session->params, FIELD_GROUP_ID); OnBindFinish() local [all...] |
/base/security/device_auth/services/legacy/group_manager/src/ |
H A D | group_manager.c | 81 int32_t CheckAccessToGroupImpl(int32_t osAccountId, const char *appId, const char *groupId) in CheckAccessToGroupImpl() argument 84 return IsGroupSupport() ? GetGroupImplInstance()->checkAccessToGroup(osAccountId, appId, groupId) in CheckAccessToGroupImpl() 88 int32_t GetGroupInfoByIdImpl(int32_t osAccountId, const char *appId, const char *groupId, char **returnGroupInfo) in GetGroupInfoByIdImpl() argument 91 return IsGroupSupport() ? GetGroupImplInstance()->getAccessibleGroupInfoById(osAccountId, appId, groupId, in GetGroupInfoByIdImpl() 119 int32_t GetDeviceInfoByIdImpl(int32_t osAccountId, const char *appId, const char *deviceId, const char *groupId, in GetDeviceInfoByIdImpl() argument 125 groupId, returnDeviceInfo) : HC_ERR_NOT_SUPPORT; in GetDeviceInfoByIdImpl() 128 int32_t GetTrustedDevicesImpl(int32_t osAccountId, const char *appId, const char *groupId, in GetTrustedDevicesImpl() argument 132 return IsGroupSupport() ? GetGroupImplInstance()->getAccessibleTrustedDevices(osAccountId, appId, groupId, in GetTrustedDevicesImpl() 136 bool IsDeviceInGroupImpl(int32_t osAccountId, const char *appId, const char *groupId, const char *deviceId) in IsDeviceInGroupImpl() argument 139 return IsGroupSupport() ? GetGroupImplInstance()->isDeviceInAccessibleGroup(osAccountId, appId, groupId, in IsDeviceInGroupImpl() [all...] |
/base/telephony/core_service/utils/vcard/src/contact_data/ |
H A D | vcard_group_data.cpp | 37 std::string groupId;
in BuildData() local 39 resultSet->GetString(index, groupId);
in BuildData() 40 if (groupId.empty()) {
in BuildData() 41 TELEPHONY_LOGE("BuildData groupId is empty");
in BuildData() 44 groupId_ = std::stoi(groupId);
in BuildData() 75 void VCardGroupData::SetGroupId(int32_t groupId)
in SetGroupId() argument 77 groupId_ = groupId;
in SetGroupId()
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_auth_sub_session/ |
H A D | compatible_auth_sub_session_common.c | 105 static void GetGroupInfoByGroupId(int32_t osAccountId, const char *groupId, in GetGroupInfoByGroupId() argument 109 queryParams.groupId = groupId; in GetGroupInfoByGroupId() 111 LOGE("Failed to query groups for groupId: %s!", groupId); in GetGroupInfoByGroupId() 115 static int32_t AddGeneralParams(const char *groupId, int32_t groupType, const TrustedDeviceEntry *localAuthInfo, in AddGeneralParams() argument 118 if (AddStringToJson(paramsData, FIELD_GROUP_ID, groupId) != HC_SUCCESS) { in AddGeneralParams() 119 LOGE("Failed to add groupId for client auth!"); in AddGeneralParams() 134 if (AddStringToJson(paramsData, FIELD_SERVICE_TYPE, groupId) != HC_SUCCESS) { in AddGeneralParams() 135 LOGE("Failed to add serviceType with groupId fo in AddGeneralParams() 142 ExtractAndAddParams(int32_t osAccountId, const char *groupId, const TrustedGroupEntry *groupInfo, CJson *paramsData) ExtractAndAddParams() argument 176 AddUpgradeFlagToParams(CJson *paramsData, int32_t osAccountId, const char *peerUdid, const char *peerAuthId, const char *groupId) AddUpgradeFlagToParams() argument 240 const char *groupId = StringGet(&(groupInfo->id)); FillAuthParams() local 274 GetCandidateAuthInfo(int32_t osAccountId, const char *groupId, const CJson *param, ParamsVecForAuth *authParamsVec) GetCandidateAuthInfo() argument 587 const char *groupId = GetStringFromJson(param, FIELD_GROUP_ID); GetAuthParamsVec() local [all...] |
/base/security/device_auth/services/identity_manager/src/ |
H A D | identity_group.c | 69 static void GetGroupInfoByGroupId(int32_t osAccountId, const char *groupId, GroupEntryVec *groupEntryVec) in GetGroupInfoByGroupId() argument 72 queryParams.groupId = groupId; in GetGroupInfoByGroupId() 75 LOGE("Failed to query groups for groupId: %s!", groupId); in GetGroupInfoByGroupId() 96 int32_t osAccountId, int32_t groupType, const char *deviceId, const char *groupId, bool isUdid) in IsDeviceInGroup() 99 return GaIsDeviceInGroup(groupType, osAccountId, deviceId, NULL, groupId); in IsDeviceInGroup() 101 return GaIsDeviceInGroup(groupType, osAccountId, NULL, deviceId, groupId); in IsDeviceInGroup() 164 int32_t osAccountId, const char *groupId, const char *deviceId, bool isUdid, IdentityInfo *info) in GetAccountUnrelatedIdentityInfo() 171 int32_t ret = GaGetTrustedDeviceEntryById(osAccountId, deviceId, isUdid, groupId, deviceEntr in GetAccountUnrelatedIdentityInfo() 95 IsDeviceInGroup( int32_t osAccountId, int32_t groupType, const char *deviceId, const char *groupId, bool isUdid) IsDeviceInGroup() argument 163 GetAccountUnrelatedIdentityInfo( int32_t osAccountId, const char *groupId, const char *deviceId, bool isUdid, IdentityInfo *info) GetAccountUnrelatedIdentityInfo() argument 228 const char *groupId = StringGet(&groupEntry->id); GetIdentityInfo() local 273 const char *groupId = StringGet(&(groupEntry->id)); GetIdentityInfos() local 307 const char *groupId = GetStringFromJson(in, FIELD_GROUP_ID); GetCredInfosByPeerIdentity() local 379 const char *groupId = GetStringFromJson(urlJson, FIELD_GROUP_ID); CheckAndGetP2pCredInfo() local 479 AuthGeneratePsk(const CJson *in, const char *groupId, const Uint8Buff *seed, Uint8Buff *sharedSecret) AuthGeneratePsk() argument 521 GetSharedSecretForP2pInIso(const CJson *in, const char *groupId, Uint8Buff *sharedSecret) GetSharedSecretForP2pInIso() argument 552 GetSelfAuthIdAndUserType( int32_t osAccountId, const char *groupId, Uint8Buff *authIdBuff, int32_t *userType, int32_t *upgradeFlag) GetSelfAuthIdAndUserType() argument 639 CheckSelfKeyAlias(const Uint8Buff *selfKeyAlias, bool isSelfFromUpgrade, int32_t osAccountId, const char *groupId) CheckSelfKeyAlias() argument 654 CheckPeerKeyAlias(const Uint8Buff *peerKeyAlias, bool isPeerFromUpgrade, int32_t osAccountId, const char *groupId, const TrustedDeviceEntry *peerDeviceEntry) CheckPeerKeyAlias() argument 669 ComputeAndSavePsk(int32_t osAccountId, const char *groupId, const TrustedDeviceEntry *peerDeviceEntry, const Uint8Buff *sharedKeyAlias) ComputeAndSavePsk() argument 722 GeneratePskAliasAndCheckExist(const CJson *in, const char *groupId, Uint8Buff *pskKeyAlias) GeneratePskAliasAndCheckExist() argument 769 GetSharedSecretForP2pInPake(const CJson *in, const char *groupId, Uint8Buff *sharedSecret) GetSharedSecretForP2pInPake() argument 824 const char *groupId = GetStringFromJson(urlJson, FIELD_GROUP_ID); GetSharedSecretForP2p() local [all...] |
H A D | cert_operation.c | 55 static int32_t GetIdentityInfoByType(int32_t keyType, int32_t trustType, const char *groupId, IdentityInfo *info) in GetIdentityInfoByType() argument 78 AddStringToJson(urlJson, FIELD_GROUP_ID, groupId) != HC_SUCCESS) { in GetIdentityInfoByType() 248 const char *groupId = StringGet(&groupEntry->id); in GetSelfDeviceEntryByPeerCert() local 249 int32_t ret = GetSelfDeviceEntry(osAccountId, groupId, deviceEntry); in GetSelfDeviceEntryByPeerCert() 442 static int32_t GetLocalDeviceType(int32_t osAccountId, const CJson *in, const char *groupId, int32_t *localDevType) in GetLocalDeviceType() argument 449 int32_t ret = GetPeerDeviceEntry(osAccountId, in, groupId, deviceEntry); in GetLocalDeviceType() 464 static int32_t GenerateAuthTokenForAccessory(int32_t osAccountId, const char *groupId, Uint8Buff *authToken) in GenerateAuthTokenForAccessory() argument 471 int32_t ret = GetSelfDeviceEntry(osAccountId, groupId, deviceEntry); in GenerateAuthTokenForAccessory() 508 int32_t osAccountId, const CJson *in, const char *groupId, Uint8Buff *authTokenAlias) in GenerateTokenAliasForController() 515 int32_t ret = GetPeerDeviceEntry(osAccountId, in, groupId, deviceEntr in GenerateTokenAliasForController() 507 GenerateTokenAliasForController( int32_t osAccountId, const CJson *in, const char *groupId, Uint8Buff *authTokenAlias) GenerateTokenAliasForController() argument 547 const char *groupId = GetStringFromJson(urlJson, FIELD_GROUP_ID); GenerateAuthTokenByDevType() local 567 GetSelfAccountIdentityInfo( int32_t osAccountId, const char *groupId, IdentityInfo *info, bool isNeedGeneratePdid) GetSelfAccountIdentityInfo() argument 616 GetAccountRelatedCredInfo( int32_t osAccountId, const char *groupId, const char *deviceId, bool isUdid, IdentityInfo *info) GetAccountRelatedCredInfo() argument 825 const char *groupId = GetStringFromJson(urlJson, FIELD_GROUP_ID); GetAccountSymCredInfoByPeerUrl() local [all...] |
/base/security/device_auth/services/legacy/group_manager/src/group_operation/ |
H A D | group_operation.c | 177 static bool IsQueryParamsValid(int groupType, const char *groupId, const char *groupName, const char *groupOwner) in IsQueryParamsValid() argument 179 if ((groupType == ALL_GROUP) && (groupId == NULL) && (groupName == NULL) && (groupOwner == NULL)) { in IsQueryParamsValid() 201 TrustedGroupEntry *groupEntry = GetGroupEntryById(osAccountId, StringGet(&(*entry)->groupId)); in QueryRelatedGroupsForGetPk() 219 static int32_t GetPkByParams(int32_t osAccountId, const char *groupId, const TrustedDeviceEntry *deviceEntry, in GetPkByParams() argument 245 .serviceType = groupId, in GetPkByParams() 262 static int32_t GeneratePkInfo(int32_t osAccountId, const char *queryUdid, const char *groupId, CJson *pkInfo) in GeneratePkInfo() argument 264 TrustedDeviceEntry *deviceEntry = GetTrustedDeviceEntryById(osAccountId, queryUdid, true, groupId); in GeneratePkInfo() 270 int32_t result = GetPkByParams(osAccountId, groupId, deviceEntry, returnPkHexStr, sizeof(returnPkHexStr)); in GeneratePkInfo() 275 if (AddStringToJson(pkInfo, FIELD_GROUP_ID, groupId) != HC_SUCCESS) { in GeneratePkInfo() 276 LOGE("Failed to add groupId t in GeneratePkInfo() 296 const char *groupId = StringGet(&((*entry)->id)); AddAllPkInfoToList() local 410 const char *groupId = NULL; DeleteGroup() local 817 CheckAccessToGroup(int32_t osAccountId, const char *appId, const char *groupId) CheckAccessToGroup() argument 836 GetAccessibleGroupInfoById(int32_t osAccountId, const char *appId, const char *groupId, char **returnGroupInfo) GetAccessibleGroupInfoById() argument 909 const char *groupId = GetStringFromJson(queryParamsJson, FIELD_GROUP_ID); GetAccessibleGroupInfo() local 1001 CheckParams(int32_t osAccountId, const char *appId, const DeviceQueryParams *devQueryParams, const char *groupId, char **returnDeviceInfo) CheckParams() argument 1012 GetAccessibleDeviceInfoById(int32_t osAccountId, const char *appId, const DeviceQueryParams *devQueryParams, const char *groupId, char **returnDeviceInfo) GetAccessibleDeviceInfoById() argument 1064 GetAccessibleTrustedDevices(int32_t osAccountId, const char *appId, const char *groupId, char **returnDevInfoVec, uint32_t *deviceNum) GetAccessibleTrustedDevices() argument 1097 IsDeviceInAccessibleGroup(int32_t osAccountId, const char *appId, const char *groupId, const char *deviceId, bool isUdid) IsDeviceInAccessibleGroup() argument [all...] |
/base/security/device_auth/test/fuzztest/group_manage/groupoperationcommon_fuzzer/ |
H A D | groupoperationcommon_fuzzer.cpp | 31 .groupId = NORMAL_STR, 39 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry *groupParams) in GenerateGroupParams() argument 42 (void)groupId; in GenerateGroupParams() 47 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *devParams) in GenerateDevParams() argument 50 (void)groupId; in GenerateDevParams() 238 const char *groupId = "ABCD"; in GroupOperationTest34() local 239 (void)DelGroupFromDb(DEFAULT_OS_ACCOUNT, groupId); in GroupOperationTest34() 361 const char *groupId = nullptr; in GroupOperationTest54() local 362 (void)GetGroupIdFromJson(nullptr, &groupId); in GroupOperationTest54() 374 const char *groupId in GroupOperationTest56() local [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 | 236 const char *groupId = StringGet(&tempEntry->id); in GaGetAccountGroup() local 237 if (groupId != NULL) { in GaGetAccountGroup() 238 PRINT_SENSITIVE_DATA("GroupId", groupId); in GaGetAccountGroup() 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() 308 const char *groupId = StringGet(&entry->id); in FillAccountAuthInfo() local 311 if ((selfUserId == NULL) || (groupId == NULL) || (selfDeviceId == NULL) || (selfDevId == 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, peerDeviceInf in IsDeviceImportedByCloud() 533 const char *groupId = StringGet(&groupEntry->id); AddGroupIdForServer() local 554 const char *groupId = StringGet(&groupEntry->id); AddSelfDevInfoForServer() local 717 PrepareTrustedDeviceInfo(const char *peerUdid, const char *groupId, const CJson *out, TrustedDeviceEntry *devEntry) PrepareTrustedDeviceInfo() argument 765 const char *groupId = GetStringFromJson(authParam, FIELD_GROUP_ID); AddTrustedDeviceForAccount() local [all...] |
/base/security/device_auth/services/session_manager/src/session/v2/expand_sub_session/expand_process_lib/ |
H A D | save_trusted_info.c | 55 char *groupId; member 98 static TrustedGroupEntry *GetGroupEntryById(int32_t osAccountId, const char *groupId) in GetGroupEntryById() argument 102 params.groupId = groupId; in GetGroupEntryById() 128 TrustedGroupEntry *entry = GetGroupEntryById(params->osAccountId, params->groupId); in CheckGroupValidity() 154 TrustedGroupEntry *entry = GetGroupEntryById(params->osAccountId, params->groupId); in ClientSendTrustedInfoProcEvent() 238 LOGE("copy groupId fail."); in ServerSendTrustedInfoParseEvent() 242 LOGE("copy groupId fail."); in ServerSendTrustedInfoParseEvent() 272 if (!StringSetPointer(&groupParams->id, params->groupId)) { in GenerateGroupParams() 273 LOGE("Failed to copy groupId!"); in GenerateGroupParams() 435 GetTrustedDeviceEntryById(int32_t osAccountId, const char *udid, const char *groupId) GetTrustedDeviceEntryById() argument [all...] |
/base/security/device_auth/services/identity_manager/inc/ |
H A D | identity_common.h | 33 int32_t GetSelfDeviceEntry(int32_t osAccountId, const char *groupId, TrustedDeviceEntry *deviceEntry); 36 int32_t osAccountId, const CJson *in, const char *groupId, TrustedDeviceEntry *returnDeviceEntry);
|
/base/security/device_auth/test/fuzztest/group_manage/checkaccess_fuzzer/ |
H A D | checkaccess_fuzzer.cpp | 33 std::string groupId(reinterpret_cast<const char *>(data), size); in FuzzDoCheckAccessToGroup() 34 gmInstance->checkAccessToGroup(*osAccountId, appId.c_str(), groupId.c_str()); in FuzzDoCheckAccessToGroup()
|
/base/security/device_auth/test/fuzztest/group_manage/getdeviceinfobyid_fuzzer/ |
H A D | getdeviceinfobyid_fuzzer.cpp | 34 std::string groupId(reinterpret_cast<const char *>(data), size); in FuzzDoGetDeviceInfoById() 36 gmInstance->getDeviceInfoById(*osAccountId, appId.c_str(), deviceId.c_str(), groupId.c_str(), &outDevInfo); in FuzzDoGetDeviceInfoById()
|
/base/security/device_auth/test/fuzztest/group_manage/getgroupinfobyid_fuzzer/ |
H A D | getgroupinfobyid_fuzzer.cpp | 33 std::string groupId(reinterpret_cast<const char *>(data), size); in FuzzDoGetGroupInfoById() 35 gmInstance->getGroupInfoById(*osAccountId, appId.c_str(), groupId.c_str(), &groupInfo); in FuzzDoGetGroupInfoById()
|
/base/security/device_auth/test/fuzztest/group_manage/gettrusteddevices_fuzzer/ |
H A D | gettrusteddevices_fuzzer.cpp | 33 std::string groupId(reinterpret_cast<const char *>(data), size); in FuzzDoGetTrustedDevices() 36 gmInstance->getTrustedDevices(*osAccountId, appId.c_str(), groupId.c_str(), &outDevInfo, &outDevNum); in FuzzDoGetTrustedDevices()
|