/base/security/device_auth/services/group_manager/src/group_operation/peer_to_peer_group/ |
D | peer_to_peer_group.c | 53 static int32_t CheckGroupName(int32_t osAccountId, const char *appId, const CJson *jsonParams) in CheckGroupName() argument 55 const char *groupName = GetStringFromJson(jsonParams, FIELD_GROUP_NAME); in CheckGroupName() 97 static int32_t GeneratePeerToPeerGroupId(const CJson *jsonParams, char **returnGroupId) in GeneratePeerToPeerGroupId() argument 99 const char *groupName = GetStringFromJson(jsonParams, FIELD_GROUP_NAME); in GeneratePeerToPeerGroupId() 104 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in GeneratePeerToPeerGroupId() 117 static int32_t CheckCreateParams(int32_t osAccountId, const CJson *jsonParams) in CheckCreateParams() argument 119 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in CheckCreateParams() 125 if (((result = CheckGroupName(osAccountId, appId, jsonParams)) != HC_SUCCESS) || in CheckCreateParams() 126 ((result = CheckUserTypeIfExist(jsonParams)) != HC_SUCCESS) || in CheckCreateParams() 127 ((result = CheckGroupVisibilityIfExist(jsonParams)) != HC_SUCCESS) || in CheckCreateParams() [all …]
|
/base/security/device_auth/services/group_manager/src/group_operation/identical_account_group/ |
D | identical_account_group.c | 30 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *… in GenerateDevParams() argument 34 ((result = AddCredTypeToParams(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 35 ((result = AddUserIdToDevParams(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 36 ((result = AddAuthIdToParamsOrDefault(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 38 ((result = AddUserTypeToParamsOrDefault(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 46 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry … in GenerateGroupParams() argument 48 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in GenerateGroupParams() 57 ((result = AddUserIdToGroupParams(jsonParams, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 59 ((result = AddGroupVisibilityOrDefault(jsonParams, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 60 ((result = AddExpireTimeOrDefault(jsonParams, groupParams)) != HC_SUCCESS)) { in GenerateGroupParams() [all …]
|
/base/security/device_auth/services/group_manager/src/group_operation/across_account_group/ |
D | across_account_group.c | 89 static int32_t AddCredTypeToParamsFromIdenticalGroup(int32_t osAccountId, CJson *jsonParams) in AddCredTypeToParamsFromIdenticalGroup() argument 92 int32_t result = GetUserIdFromJson(jsonParams, &userId); in AddCredTypeToParamsFromIdenticalGroup() 115 if (AddIntToJson(jsonParams, FIELD_CREDENTIAL_TYPE, deviceEntry->credential) != HC_SUCCESS) { in AddCredTypeToParamsFromIdenticalGroup() 126 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *… in GenerateDevParams() argument 130 ((result = AddAuthIdToParamsOrDefault(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 131 ((result = AddCredTypeToParams(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 132 ((result = AddUserIdToDevParams(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 134 ((result = AddUserTypeToParamsOrDefault(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 142 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry … in GenerateGroupParams() argument 144 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in GenerateGroupParams() [all …]
|
/base/security/device_auth/services/group_manager/inc/ |
D | group_operation_common.h | 36 int32_t ProcessKeyPair(int action, const CJson *jsonParams, const char *groupId); 39 int32_t AssertUserIdExist(const CJson *jsonParams); 46 int32_t CheckUserTypeIfExist(const CJson *jsonParams); 47 int32_t CheckGroupVisibilityIfExist(const CJson *jsonParams); 48 int32_t CheckExpireTimeIfExist(const CJson *jsonParams); 55 int32_t AddGroupVisibilityOrDefault(const CJson *jsonParams, TrustedGroupEntry *groupParams); 56 int32_t AddExpireTimeOrDefault(const CJson *jsonParams, TrustedGroupEntry *groupParams); 57 int32_t AddUserIdToGroupParams(const CJson *jsonParams, TrustedGroupEntry *groupParams); 58 int32_t AddSharedUserIdToGroupParams(const CJson *jsonParams, TrustedGroupEntry *groupParams); 61 int32_t AddUdidToParams(const CJson *jsonParams, TrustedDeviceEntry *devParams); [all …]
|
D | group_manager_common.h | 29 int32_t BindCallbackToTask(GroupManagerTask *task, const CJson *jsonParams); 30 int32_t AddReqInfoToJson(int64_t requestId, const char *appId, CJson *jsonParams); 31 …_t AddBindParamsToJson(int operationCode, int64_t requestId, const char *appId, CJson *jsonParams);
|
D | base_group.h | 24 int32_t (*createGroup)(int32_t osAccountId, CJson *jsonParams, char **returnJsonStr); 25 int32_t (*deleteGroup)(int32_t osAccountId, CJson *jsonParams, char **returnJsonStr);
|
D | across_account_group.h | 27 int32_t (*addMultiMembersToGroup)(int32_t osAccountId, const char *appId, CJson *jsonParams); 28 int32_t (*delMultiMembersFromGroup)(int32_t osAccountId, const char *appId, CJson *jsonParams);
|
D | identical_account_group.h | 27 int32_t (*addMultiMembersToGroup)(int32_t osAccountId, const char *appId, CJson *jsonParams); 28 int32_t (*delMultiMembersFromGroup)(int32_t osAccountId, const char *appId, CJson *jsonParams);
|
D | peer_to_peer_group.h | 27 int32_t (*deleteMember)(int32_t osAccountId, int64_t requestId, CJson *jsonParams,
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/ |
D | compatible_bind_sub_session_util.c | 24 static int32_t AddPinCode(const CJson *returnData, CJson *jsonParams) in AddPinCode() argument 31 if (AddStringToJson(jsonParams, FIELD_PIN_CODE, pinCode) != HC_SUCCESS) { in AddPinCode() 38 static int32_t AddAuthIdIfExist(const CJson *returnData, CJson *jsonParams) in AddAuthIdIfExist() argument 41 if (authId != NULL && AddStringToJson(jsonParams, FIELD_DEVICE_ID, authId) != HC_SUCCESS) { in AddAuthIdIfExist() 48 static int32_t AddUserTypeIfExistAndValid(const CJson *returnData, CJson *jsonParams) in AddUserTypeIfExistAndValid() argument 56 if (AddIntToJson(jsonParams, FIELD_USER_TYPE, userType) != HC_SUCCESS) { in AddUserTypeIfExistAndValid() 64 static int32_t AddGroupVisibilityIfExistAndValid(const CJson *returnData, CJson *jsonParams) in AddGroupVisibilityIfExistAndValid() argument 72 if (AddIntToJson(jsonParams, FIELD_GROUP_VISIBILITY, groupVisibility) != HC_SUCCESS) { in AddGroupVisibilityIfExistAndValid() 80 static int32_t AddExpireTimeIfExistAndValid(const CJson *returnData, CJson *jsonParams) in AddExpireTimeIfExistAndValid() argument 88 if (AddIntToJson(jsonParams, FIELD_EXPIRE_TIME, expireTime) != HC_SUCCESS) { in AddExpireTimeIfExistAndValid() [all …]
|
D | compatible_bind_sub_session_common.c | 22 static int32_t AddPinCode(const CJson *jsonParams, CompatibleBindSubSession *session) in AddPinCode() argument 24 const char *pinCode = GetStringFromJson(jsonParams, FIELD_PIN_CODE); in AddPinCode() 45 static int32_t AddGroupName(const CJson *jsonParams, CJson *params) in AddGroupName() argument 47 const char *groupName = GetStringFromJson(jsonParams, FIELD_GROUP_NAME); in AddGroupName() 59 static int32_t AddGroupOwnerIfExist(const CJson *jsonParams, CJson *params) in AddGroupOwnerIfExist() argument 61 const char *groupOwner = GetStringFromJson(jsonParams, FIELD_GROUP_OWNER); in AddGroupOwnerIfExist() 69 static int32_t AddGroupTypeIfValid(const CJson *jsonParams, CJson *params) in AddGroupTypeIfValid() argument 72 if (GetIntFromJson(jsonParams, FIELD_GROUP_TYPE, &groupType) != HC_SUCCESS) { in AddGroupTypeIfValid() 87 static int32_t AddGroupVisibilityIfValidOrDefault(const CJson *jsonParams, CJson *params) in AddGroupVisibilityIfValidOrDefault() argument 90 (void)GetIntFromJson(jsonParams, FIELD_GROUP_VISIBILITY, &groupVisibility); in AddGroupVisibilityIfValidOrDefault() [all …]
|
D | compatible_bind_sub_session.c | 30 static int32_t CheckInvitePeer(const CJson *jsonParams) in CheckInvitePeer() argument 32 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); in CheckInvitePeer() 37 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in CheckInvitePeer() 43 if (GetIntFromJson(jsonParams, FIELD_OS_ACCOUNT_ID, &osAccountId) != HC_SUCCESS) { in CheckInvitePeer() 60 static int32_t CheckJoinPeer(const CJson *jsonParams) in CheckJoinPeer() argument 63 if (GetIntFromJson(jsonParams, FIELD_GROUP_TYPE, &groupType) != HC_SUCCESS) { in CheckJoinPeer() 70 static int32_t CheckClientStatus(int operationCode, const CJson *jsonParams) in CheckClientStatus() argument 74 return CheckInvitePeer(jsonParams); in CheckClientStatus() 76 return CheckJoinPeer(jsonParams); in CheckClientStatus() 147 static int32_t GenerateKeyPairIfNeeded(int isClient, int32_t opCode, CJson *jsonParams) in GenerateKeyPairIfNeeded() argument [all …]
|
/base/security/device_auth/test/unittest/deviceauth/source/ |
D | group_operation_common_test.cpp | 43 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry … in GenerateGroupParams() argument 45 (void)jsonParams; in GenerateGroupParams() 51 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *… in GenerateDevParams() argument 53 (void)jsonParams; in GenerateDevParams() 247 CJson *jsonParams = CreateJson(); variable 248 int32_t ret = AddGroupToDatabaseByJson(DEFAULT_OS_ACCOUNT, nullptr, jsonParams, NORMAL_STR); 249 FreeJson(jsonParams); 261 CJson *jsonParams = CreateJson(); variable 262 …int32_t ret = AddGroupToDatabaseByJson(DEFAULT_OS_ACCOUNT, GenerateGroupParams, jsonParams, nullpt… 263 FreeJson(jsonParams); [all …]
|
/base/security/device_auth/services/group_manager/src/ |
D | group_manager_common.c | 34 int32_t AddReqInfoToJson(int64_t requestId, const char *appId, CJson *jsonParams) in AddReqInfoToJson() argument 36 if (AddInt64StringToJson(jsonParams, FIELD_REQUEST_ID, requestId) != HC_SUCCESS) { in AddReqInfoToJson() 40 if (AddStringToJson(jsonParams, FIELD_APP_ID, appId) != HC_SUCCESS) { in AddReqInfoToJson() 47 int32_t BindCallbackToTask(GroupManagerTask *task, const CJson *jsonParams) in BindCallbackToTask() argument 49 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in BindCallbackToTask() 71 …2_t AddBindParamsToJson(int operationCode, int64_t requestId, const char *appId, CJson *jsonParams) in AddBindParamsToJson() argument 73 if (AddIntToJson(jsonParams, FIELD_OPERATION_CODE, operationCode) != HC_SUCCESS) { in AddBindParamsToJson() 77 return AddReqInfoToJson(requestId, appId, jsonParams); in AddBindParamsToJson()
|
/base/security/device_auth/services/session_manager/src/session/v1/ |
D | compatible_sub_session.c | 22 int32_t CreateCompatibleSubSession(SubSessionTypeValue sessionType, CJson *jsonParams, in CreateCompatibleSubSession() argument 26 if (jsonParams == NULL || callback == NULL || session == NULL) { in CreateCompatibleSubSession() 32 return CreateClientBindSubSession(jsonParams, callback, session); in CreateCompatibleSubSession() 34 return CreateServerBindSubSession(jsonParams, callback, session); in CreateCompatibleSubSession() 36 return CreateClientAuthSubSession(jsonParams, callback, session); in CreateCompatibleSubSession() 38 return CreateServerAuthSubSession(jsonParams, callback, session); in CreateCompatibleSubSession()
|
/base/security/device_auth/services/group_manager/src/group_operation/ |
D | group_operation_common.c | 582 int32_t CheckUserTypeIfExist(const CJson *jsonParams) in CheckUserTypeIfExist() argument 585 (void)GetIntFromJson(jsonParams, FIELD_USER_TYPE, &userType); in CheckUserTypeIfExist() 593 int32_t CheckGroupVisibilityIfExist(const CJson *jsonParams) in CheckGroupVisibilityIfExist() argument 596 (void)GetIntFromJson(jsonParams, FIELD_GROUP_VISIBILITY, &groupVisibility); in CheckGroupVisibilityIfExist() 604 int32_t CheckExpireTimeIfExist(const CJson *jsonParams) in CheckExpireTimeIfExist() argument 607 (void)GetIntFromJson(jsonParams, FIELD_EXPIRE_TIME, &expireTime); in CheckExpireTimeIfExist() 655 int32_t AddGroupVisibilityOrDefault(const CJson *jsonParams, TrustedGroupEntry *groupParams) in AddGroupVisibilityOrDefault() argument 659 (void)GetIntFromJson(jsonParams, FIELD_GROUP_VISIBILITY, &groupVisibility); in AddGroupVisibilityOrDefault() 664 int32_t AddExpireTimeOrDefault(const CJson *jsonParams, TrustedGroupEntry *groupParams) in AddExpireTimeOrDefault() argument 667 (void)GetIntFromJson(jsonParams, FIELD_EXPIRE_TIME, &expireTime); in AddExpireTimeOrDefault() [all …]
|
D | group_operation.c | 387 static int32_t CreateGroup(int32_t osAccountId, CJson *jsonParams, char **returnJsonStr) in CreateGroup() argument 390 if (GetIntFromJson(jsonParams, FIELD_GROUP_TYPE, &groupType) != HC_SUCCESS) { in CreateGroup() 399 return instance->createGroup(osAccountId, jsonParams, returnJsonStr); in CreateGroup() 402 static int32_t DeleteGroup(int32_t osAccountId, CJson *jsonParams, char **returnJsonStr) in DeleteGroup() argument 408 if (((result = GetGroupIdFromJson(jsonParams, &groupId)) != HC_SUCCESS) || in DeleteGroup() 409 ((result = GetAppIdFromJson(jsonParams, &appId)) != HC_SUCCESS) || in DeleteGroup() 416 return instance->deleteGroup(osAccountId, jsonParams, returnJsonStr); in DeleteGroup() 419 … int32_t DeleteMemberFromPeerToPeerGroup(int32_t osAccountId, int64_t requestId, CJson *jsonParams, in DeleteMemberFromPeerToPeerGroup() argument 427 return instance->deleteMember(osAccountId, requestId, jsonParams, callback); in DeleteMemberFromPeerToPeerGroup()
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_auth_sub_session/ |
D | compatible_auth_sub_session.c | 40 static int32_t CreateClientAuthSubSessionInner(int32_t osAccountId, CJson *jsonParams, in CreateClientAuthSubSessionInner() argument 45 int32_t res = GetAuthParamsVec(osAccountId, jsonParams, &authParamsVec); in CreateClientAuthSubSessionInner() 64 subSession->base.appId = GetDuplicatePkgName(jsonParams); in CreateClientAuthSubSessionInner() 278 int32_t CreateClientAuthSubSession(CJson *jsonParams, const DeviceAuthCallback *callback, in CreateClientAuthSubSession() argument 281 int32_t res = CheckInputAuthParams(jsonParams); in CreateClientAuthSubSession() 286 if (AddIntToJson(jsonParams, FIELD_OPERATION_CODE, AUTHENTICATE) != HC_SUCCESS) { in CreateClientAuthSubSession() 291 if (GetIntFromJson(jsonParams, FIELD_OS_ACCOUNT_ID, &osAccountId) != HC_SUCCESS) { in CreateClientAuthSubSession() 295 return CreateClientAuthSubSessionInner(osAccountId, jsonParams, callback, session); in CreateClientAuthSubSession() 298 int32_t CreateServerAuthSubSession(CJson *jsonParams, const DeviceAuthCallback *callback, in CreateServerAuthSubSession() argument 303 int32_t res = GetAuthInfoForServer(jsonParams, &authVec); in CreateServerAuthSubSession() [all …]
|
/base/security/device_auth/services/group_manager/src/channel_manager/ |
D | channel_manager.c | 46 ChannelType GetChannelType(const DeviceAuthCallback *callback, const CJson *jsonParams) in GetChannelType() argument 49 const char *connectParams = GetStringFromJson(jsonParams, FIELD_CONNECT_PARAMS); in GetChannelType() 60 int32_t OpenChannel(ChannelType channelType, const CJson *jsonParams, int64_t requestId, int64_t *r… in OpenChannel() argument 70 const char *connectParams = GetStringFromJson(jsonParams, FIELD_CONNECT_PARAMS); in OpenChannel()
|
/base/security/device_auth/services/session_manager/inc/session/v1/compatible_bind_sub_session/ |
D | compatible_bind_sub_session_util.h | 27 int32_t CombineConfirmData(int operationCode, const CJson *returnData, CJson *jsonParams); 29 void InformPeerProcessError(int64_t requestId, const CJson *jsonParams, const DeviceAuthCallback *c…
|
D | compatible_bind_sub_session_common.h | 26 int32_t GenerateBaseBindParams(int32_t osAccountId, int isClient, const CJson *jsonParams,
|
/base/security/device_auth/services/group_manager/inc/channel_manager/ |
D | channel_manager.h | 31 ChannelType GetChannelType(const DeviceAuthCallback *callback, const CJson *jsonParams); 32 int32_t OpenChannel(ChannelType channelType, const CJson *jsonParams, int64_t requestId, int64_t *r…
|
/base/security/device_auth/services/session_manager/inc/session/v1/ |
D | compatible_sub_session.h | 25 int32_t CreateCompatibleSubSession(SubSessionTypeValue sessionType, CJson *jsonParams,
|