/base/security/device_auth/services/group_manager/src/session/bind_session/ |
D | bind_session_server.c | 26 static int32_t AddRecvModuleDataToParams(CJson *jsonParams, CJson *moduleParams) in AddRecvModuleDataToParams() argument 29 if (GetIntFromJson(jsonParams, FIELD_MESSAGE, &message) != HC_SUCCESS) { in AddRecvModuleDataToParams() 34 (void)GetIntFromJson(jsonParams, FIELD_AUTH_FORM, &authForm); in AddRecvModuleDataToParams() 35 CJson *payload = GetObjFromJson(jsonParams, FIELD_PAYLOAD); in AddRecvModuleDataToParams() 64 static int32_t GenerateServerModuleParams(BindSession *session, CJson *jsonParams, CJson *modulePar… in GenerateServerModuleParams() argument 69 ((result = AddRecvModuleDataToParams(jsonParams, moduleParams)) != HC_SUCCESS)) { in GenerateServerModuleParams() 75 static int32_t GetServerModuleReturnData(BindSession *session, CJson *jsonParams, CJson *out, bool … in GetServerModuleReturnData() argument 83 int32_t result = GenerateServerModuleParams(session, jsonParams, moduleParams); in GetServerModuleReturnData() 90 DeleteAllItem(jsonParams); in GetServerModuleReturnData() 102 static int32_t PrepareData(BindSession *session, CJson *jsonParams, CJson **sendData, bool *isNeedI… in PrepareData() argument [all …]
|
D | bind_session_common.c | 272 static int32_t TryAddPeerUserTypeToParams(const CJson *jsonParams, BindSession *session) in TryAddPeerUserTypeToParams() argument 275 if (GetIntFromJson(jsonParams, FIELD_PEER_USER_TYPE, &peerUserType) == HC_SUCCESS) { in TryAddPeerUserTypeToParams() 368 static int32_t AddGroupName(const CJson *jsonParams, CJson *params) in AddGroupName() argument 370 const char *groupName = GetStringFromJson(jsonParams, FIELD_GROUP_NAME); in AddGroupName() 382 static int32_t AddGroupOwnerIfExist(const CJson *jsonParams, CJson *params) in AddGroupOwnerIfExist() argument 384 const char *groupOwner = GetStringFromJson(jsonParams, FIELD_GROUP_OWNER); in AddGroupOwnerIfExist() 394 static int32_t AddGroupTypeIfValid(const CJson *jsonParams, CJson *params) in AddGroupTypeIfValid() argument 397 if (GetIntFromJson(jsonParams, FIELD_GROUP_TYPE, &groupType) != HC_SUCCESS) { in AddGroupTypeIfValid() 412 static int32_t AddGroupVisibilityIfValidOrDefault(const CJson *jsonParams, CJson *params) in AddGroupVisibilityIfValidOrDefault() argument 415 (void)GetIntFromJson(jsonParams, FIELD_GROUP_VISIBILITY, &groupVisibility); in AddGroupVisibilityIfValidOrDefault() [all …]
|
D | bind_session_client.c | 137 static int32_t PrepareClient(const CJson *jsonParams, BindSession *session) in PrepareClient() argument 139 int32_t result = GenerateBindParams(session->osAccountId, CLIENT, jsonParams, session); in PrepareClient() 143 return OpenChannel(session->channelType, jsonParams, session->reqId, &session->channelId); in PrepareClient() 146 Session *CreateClientBindSession(CJson *jsonParams, const DeviceAuthCallback *callback) in CreateClientBindSession() argument 149 if (GetIntFromJson(jsonParams, FIELD_OPERATION_CODE, &opCode) != HC_SUCCESS) { in CreateClientBindSession() 159 const char *groupId = GetStringFromJson(jsonParams, FIELD_GROUP_ID); in CreateClientBindSession() 164 result = ProcessKeyPair(CREATE_KEY_PAIR, jsonParams, groupId); in CreateClientBindSession() 171 jsonParams, callback, ProcessBindSession); in CreateClientBindSession() 175 InitClientChannel(callback, jsonParams, session); in CreateClientBindSession() 179 result = PrepareClient(jsonParams, session); in CreateClientBindSession()
|
/base/security/device_auth/services/group_manager/src/group_operation/peer_to_peer_group/ |
D | peer_to_peer_group.c | 52 static int32_t CheckGroupName(int32_t osAccountId, const char *appId, const CJson *jsonParams) in CheckGroupName() argument 54 const char *groupName = GetStringFromJson(jsonParams, FIELD_GROUP_NAME); in CheckGroupName() 96 static int32_t GeneratePeerToPeerGroupId(const CJson *jsonParams, char **returnGroupId) in GeneratePeerToPeerGroupId() argument 98 const char *groupName = GetStringFromJson(jsonParams, FIELD_GROUP_NAME); in GeneratePeerToPeerGroupId() 103 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in GeneratePeerToPeerGroupId() 116 static int32_t CheckCreateParams(int32_t osAccountId, const CJson *jsonParams) in CheckCreateParams() argument 118 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in CheckCreateParams() 124 if (((result = CheckGroupName(osAccountId, appId, jsonParams)) != HC_SUCCESS) || in CheckCreateParams() 125 ((result = CheckUserTypeIfExist(jsonParams)) != HC_SUCCESS) || in CheckCreateParams() 126 ((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 | 29 static int32_t GenerateDevParams(const CJson *jsonParams, const char *groupId, TrustedDeviceEntry *… in GenerateDevParams() argument 33 ((result = AddCredTypeToParams(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 34 ((result = AddUserIdToDevParams(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 35 ((result = AddAuthIdToParamsOrDefault(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 37 ((result = AddUserTypeToParamsOrDefault(jsonParams, devParams)) != HC_SUCCESS) || in GenerateDevParams() 45 static int32_t GenerateGroupParams(const CJson *jsonParams, const char *groupId, TrustedGroupEntry … in GenerateGroupParams() argument 47 const char *appId = GetStringFromJson(jsonParams, FIELD_APP_ID); in GenerateGroupParams() 56 ((result = AddUserIdToGroupParams(jsonParams, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 58 ((result = AddGroupVisibilityOrDefault(jsonParams, groupParams)) != HC_SUCCESS) || in GenerateGroupParams() 59 ((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 | peer_to_peer_group.h | 27 int32_t (*addMember)(int32_t osAccountId, int64_t requestId, CJson *jsonParams, 29 int32_t (*deleteMember)(int32_t osAccountId, int64_t requestId, CJson *jsonParams, 31 int32_t (*processData)(int64_t requestId, CJson *jsonParams,
|
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 | 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 | 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);
|
/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/group_manager/src/group_operation/ |
D | group_operation_common.c | 601 int32_t CheckUserTypeIfExist(const CJson *jsonParams) in CheckUserTypeIfExist() argument 604 (void)GetIntFromJson(jsonParams, FIELD_USER_TYPE, &userType); in CheckUserTypeIfExist() 612 int32_t CheckGroupVisibilityIfExist(const CJson *jsonParams) in CheckGroupVisibilityIfExist() argument 615 (void)GetIntFromJson(jsonParams, FIELD_GROUP_VISIBILITY, &groupVisibility); in CheckGroupVisibilityIfExist() 623 int32_t CheckExpireTimeIfExist(const CJson *jsonParams) in CheckExpireTimeIfExist() argument 626 (void)GetIntFromJson(jsonParams, FIELD_EXPIRE_TIME, &expireTime); in CheckExpireTimeIfExist() 672 int32_t AddGroupVisibilityOrDefault(const CJson *jsonParams, TrustedGroupEntry *groupParams) in AddGroupVisibilityOrDefault() argument 676 (void)GetIntFromJson(jsonParams, FIELD_GROUP_VISIBILITY, &groupVisibility); in AddGroupVisibilityOrDefault() 681 int32_t AddExpireTimeOrDefault(const CJson *jsonParams, TrustedGroupEntry *groupParams) in AddExpireTimeOrDefault() argument 684 (void)GetIntFromJson(jsonParams, FIELD_EXPIRE_TIME, &expireTime); in AddExpireTimeOrDefault() [all …]
|
/base/security/device_auth/services/group_manager/src/session/bind_session_mock/ |
D | bind_session_client_mock.c | 19 Session *CreateClientBindSession(CJson *jsonParams, const DeviceAuthCallback *callback) in CreateClientBindSession() argument 22 (void)jsonParams; in CreateClientBindSession()
|
D | bind_session_server_mock.c | 19 Session *CreateServerBindSession(CJson *jsonParams, const DeviceAuthCallback *callback) in CreateServerBindSession() argument 22 (void)jsonParams; in CreateServerBindSession()
|
/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 66 const char *connectParams = GetStringFromJson(jsonParams, FIELD_CONNECT_PARAMS); in OpenChannel()
|
/base/security/device_auth/services/group_manager/inc/session/key_agree_session/ |
D | key_agree_session_common.h | 21 int32_t ProcessKeyAgreeSession(Session *session, CJson *jsonParams); 22 int32_t SaveReceivedKeyAgreeData(BindSession *session, const CJson *jsonParams);
|
D | key_agree_session_server.h | 21 Session *CreateServerKeyAgreeSession(CJson *jsonParams, const DeviceAuthCallback *callback);
|
D | key_agree_session_client.h | 21 Session *CreateClientKeyAgreeSession(CJson *jsonParams, const DeviceAuthCallback *callback);
|
/base/security/device_auth/services/group_manager/inc/session/bind_session/ |
D | bind_session_common.h | 23 int32_t GenerateBindParams(int32_t osAccountId, int isClient, const CJson *jsonParams, BindSession … 27 int32_t ProcessBindSession(Session *session, CJson *jsonParams);
|
D | bind_session_server.h | 21 Session *CreateServerBindSession(CJson *jsonParams, const DeviceAuthCallback *callback);
|
D | bind_session_client.h | 21 Session *CreateClientBindSession(CJson *jsonParams, const DeviceAuthCallback *callback);
|
/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/ |
D | device_auth.c | 96 CJson *jsonParams = CreateJsonFromString(authParams); in AuthDevice() local 97 if (jsonParams == NULL) { in AuthDevice() 103 FreeJson(jsonParams); in AuthDevice() 107 if (!InitAuthDeviceTask(osAccountId, task, authReqId, jsonParams, gaCallback)) { in AuthDevice() 109 FreeJson(jsonParams); in AuthDevice() 114 FreeJson(jsonParams); in AuthDevice()
|