/base/security/deviceauth/services/group_manager/src/session/ |
D | bind_session_common_util.c | 23 static int32_t GenerateGroupErrorMsg(int32_t errorCode, const BindSession *session, CJson *errorDat… in GenerateGroupErrorMsg() argument 29 if (AddStringToJson(errorData, FIELD_APP_ID, session->appId) != HC_SUCCESS) { in GenerateGroupErrorMsg() 33 if (AddInt64StringToJson(errorData, FIELD_REQUEST_ID, session->reqId) != HC_SUCCESS) { in GenerateGroupErrorMsg() 69 BindSession *session = (BindSession *)HcMalloc(sizeof(BindSession), 0); in CreateBaseBindSession() local 70 if (session == NULL) { in CreateBaseBindSession() 74 int32_t res = GenerateSessionOrTaskId(&session->base.sessionId); in CreateBaseBindSession() 77 HcFree(session); in CreateBaseBindSession() 80 session->appId = GetDuplicateAppId(params); in CreateBaseBindSession() 81 if (session->appId == NULL) { in CreateBaseBindSession() 82 HcFree(session); in CreateBaseBindSession() [all …]
|
/base/security/deviceauth/services/group_manager/src/session/bind_session_lite/ |
D | bind_session_server_lite.c | 24 static int32_t RequestConfirmation(const BindSession *session, char **returnStr) in RequestConfirmation() argument 26 char *returnDataStr = ProcessRequestCallback(session->reqId, session->opCode, NULL, in RequestConfirmation() 27 session->base.callback); in RequestConfirmation() 46 static int32_t LitePrepareServer(BindSession *session, CJson *returnData, bool *isNeedInform) in LitePrepareServer() argument 48 if ((session->isWaiting) && (!IsAcceptRequest(returnData))) { in LitePrepareServer() 52 int32_t result = CombineInputData(returnData, session->params); in LitePrepareServer() 55 session->isWaiting = false; in LitePrepareServer() 59 return LitePrepareAndSendData(session, isNeedInform); in LitePrepareServer() 62 static int32_t JudgeConfirmation(CJson *returnData, CJson *jsonParams, BindSession *session, bool *… in JudgeConfirmation() argument 72 result = LiteSaveReceivedData(session, jsonParams); in JudgeConfirmation() [all …]
|
D | bind_session_common_lite.c | 24 static int32_t AddGroupOpToSendDataIfNeed(const BindSession *session, CJson *sendData) in AddGroupOpToSendDataIfNeed() argument 26 if ((session->moduleType != ACCOUNT_MODULE) || (session->opCode != OP_BIND)) { in AddGroupOpToSendDataIfNeed() 36 static int32_t OnSessionFinish(const BindSession *session, CJson *out) in OnSessionFinish() argument 42 res = AddGroupOpToSendDataIfNeed(session, sendData); in OnSessionFinish() 46 res = SendBindSessionData(session, sendData); in OnSessionFinish() 53 …ProcessSessionKeyCallback(session->reqId, sessionKey, DEFAULT_RETURN_KEY_LENGTH, session->base.cal… in OnSessionFinish() 62 ProcessFinishCallback(session->reqId, session->opCode, returnDataStr, session->base.callback); in OnSessionFinish() 64 LOGI("The session completed successfully! [ReqId]: %" PRId64, session->reqId); in OnSessionFinish() 65 NotifyBindResult(session->channelType, session->channelId); in OnSessionFinish() 66 CloseChannel(session->channelType, session->channelId); in OnSessionFinish() [all …]
|
D | bind_session_client_lite.c | 34 static void OnLiteBindChannelOpened(Session *session, int64_t channelId, int64_t requestId) in OnLiteBindChannelOpened() argument 36 if (session == NULL) { in OnLiteBindChannelOpened() 41 BindSession *realSession = (BindSession *)session; in OnLiteBindChannelOpened() 59 static int32_t LitePrepareClient(const CJson *jsonParams, BindSession *session) in LitePrepareClient() argument 61 int32_t result = LiteSaveReceivedData(session, jsonParams); in LitePrepareClient() 65 return OpenChannel(session->channelType, jsonParams, session->reqId, &session->channelId); in LitePrepareClient() 76 BindSession *session = CreateBaseBindSession(TYPE_CLIENT_BIND_SESSION_LITE, opCode, in CreateLiteClientBindSession() local 78 if (session == NULL) { in CreateLiteClientBindSession() 81 InitClientChannel(callback, jsonParams, session); in CreateLiteClientBindSession() 82 InitModuleType(jsonParams, session); in CreateLiteClientBindSession() [all …]
|
/base/security/deviceauth/services/group_auth/src/session/auth_session_lite/ |
D | auth_session_client_lite.c | 22 static int32_t StartClientAuthLiteTask(AuthSessionLite *session) in StartClientAuthLiteTask() argument 27 InformLocalAuthErrorLite(session->authParams, session->base.callback); in StartClientAuthLiteTask() 30 const char *pkgName = GetStringFromJson(session->authParams, FIELD_SERVICE_PKG_NAME); in StartClientAuthLiteTask() 34 InformLocalAuthErrorLite(session->authParams, session->base.callback); in StartClientAuthLiteTask() 37 if (AddStringToJson(session->authParams, FIELD_PKG_NAME, pkgName) != HC_SUCCESS) { in StartClientAuthLiteTask() 40 InformLocalAuthErrorLite(session->authParams, session->base.callback); in StartClientAuthLiteTask() 45 int32_t res = CreateAndProcessLiteTask(session, out, &status); in StartClientAuthLiteTask() 48 InformAuthErrorLite(session->authParams, session->base.callback, out, res); in StartClientAuthLiteTask() 52 res = ProcessLiteTaskStatusForAuth(session, out, status); in StartClientAuthLiteTask() 59 AuthSessionLite *session = InitAuthSessionLite(in, callback); in CreateClientAuthSessionLiteInner() local [all …]
|
D | auth_session_server_lite.c | 23 static int32_t StartServerAuthLiteTask(AuthSessionLite *session) in StartServerAuthLiteTask() argument 28 InformLocalAuthErrorLite(session->authParams, session->base.callback); in StartServerAuthLiteTask() 29 InformPeerAuthErrorLite(session->authParams, session->base.callback); in StartServerAuthLiteTask() 33 const char *pkgName = GetStringFromJson(session->authParams, FIELD_SERVICE_PKG_NAME); in StartServerAuthLiteTask() 39 if (AddStringToJson(session->authParams, FIELD_PKG_NAME, pkgName) != HC_SUCCESS) { in StartServerAuthLiteTask() 42 InformPeerAuthErrorLite(session->authParams, session->base.callback); in StartServerAuthLiteTask() 43 InformLocalAuthErrorLite(session->authParams, session->base.callback); in StartServerAuthLiteTask() 48 int32_t res = CreateAndProcessLiteTask(session, out, &status); in StartServerAuthLiteTask() 49 DeleteItemFromJson(session->authParams, FIELD_PAYLOAD); in StartServerAuthLiteTask() 52 InformAuthErrorLite(session->authParams, session->base.callback, out, res); in StartServerAuthLiteTask() [all …]
|
D | auth_session_common_lite.c | 27 static int32_t ProcessAuthTaskLite(AuthSessionLite *session, int32_t moduleType, CJson *in, CJson *… in ProcessAuthTaskLite() argument 30 int32_t res = ProcessTask(session->curTaskId, in, out, &status, moduleType); in ProcessAuthTaskLite() 32 InformAuthErrorLite(in, session->base.callback, out, res); in ProcessAuthTaskLite() 35 return ProcessLiteTaskStatusForAuth(session, out, status); in ProcessAuthTaskLite() 54 static int ProcessAuthSessionLite(Session *session, CJson *in) in ProcessAuthSessionLite() argument 57 if ((session == NULL) || (in == NULL)) { in ProcessAuthSessionLite() 62 AuthSessionLite *realSession = (AuthSessionLite *)session; in ProcessAuthSessionLite() 189 int32_t ReturnTransmitDataLite(const AuthSessionLite *session, CJson *out) in ReturnTransmitDataLite() argument 197 const DeviceAuthCallback *callback = session->base.callback; in ReturnTransmitDataLite() 199 if (GetByteFromJson(session->authParams, FIELD_REQUEST_ID, in ReturnTransmitDataLite() [all …]
|
/base/security/deviceauth/services/group_manager/src/session/bind_session/ |
D | bind_session_client.c | 24 static int32_t GenerateClientModuleParams(BindSession *session, CJson *moduleParams) in GenerateClientModuleParams() argument 27 ((session->opCode == MEMBER_DELETE) ? OP_UNBIND : OP_BIND)) != HC_SUCCESS) { in GenerateClientModuleParams() 31 return GenerateBasicModuleParams(true, session, moduleParams); in GenerateClientModuleParams() 34 static int32_t GetClientModuleReturnData(BindSession *session, CJson *out) in GetClientModuleReturnData() argument 42 int32_t result = GenerateClientModuleParams(session, moduleParams); in GetClientModuleReturnData() 49 result = CreateAndProcessModule(session, moduleParams, out); in GetClientModuleReturnData() 57 static int32_t PrepareData(BindSession *session, CJson **sendData) in PrepareData() argument 64 int32_t result = GetClientModuleReturnData(session, out); in PrepareData() 77 result = AddInfoToSendData(false, session, *sendData); in PrepareData() 87 static int32_t PrepareAndSendData(BindSession *session) in PrepareAndSendData() argument [all …]
|
D | bind_session_common.c | 28 static int32_t AddGroupInfoToSendData(const BindSession *session, CJson *data) in AddGroupInfoToSendData() argument 30 const char *groupId = GetStringFromJson(session->params, FIELD_GROUP_ID); in AddGroupInfoToSendData() 35 const char *groupName = GetStringFromJson(session->params, FIELD_GROUP_NAME); in AddGroupInfoToSendData() 48 if (AddIntToJson(data, FIELD_GROUP_OP, session->opCode) != HC_SUCCESS) { in AddGroupInfoToSendData() 59 static int32_t AddDevInfoToSendData(const BindSession *session, CJson *data) in AddDevInfoToSendData() argument 61 const char *authId = GetStringFromJson(session->params, FIELD_AUTH_ID); in AddDevInfoToSendData() 66 const char *udid = GetStringFromJson(session->params, FIELD_CONN_DEVICE_ID); in AddDevInfoToSendData() 82 static int32_t AddRequestInfoToSendData(const BindSession *session, CJson *data) in AddRequestInfoToSendData() argument 84 if (AddStringToJson(data, FIELD_APP_ID, session->appId) != HC_SUCCESS) { in AddRequestInfoToSendData() 88 if (AddInt64StringToJson(data, FIELD_REQUEST_ID, session->reqId) != HC_SUCCESS) { in AddRequestInfoToSendData() [all …]
|
D | bind_session_server.c | 64 static int32_t GenerateServerModuleParams(BindSession *session, CJson *jsonParams, CJson *modulePar… in GenerateServerModuleParams() argument 67 if (((result = GenerateBasicModuleParams(false, session, 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() 92 result = CreateAndProcessModule(session, moduleParams, out); in GetServerModuleReturnData() 96 InformPeerModuleError(out, session); in GetServerModuleReturnData() 102 static int32_t PrepareData(BindSession *session, CJson *jsonParams, CJson **sendData, bool *isNeedI… in PrepareData() argument 110 int32_t result = GetServerModuleReturnData(session, jsonParams, out, isNeedInform); in PrepareData() 123 result = AddInfoToSendData((session->opCode == MEMBER_JOIN), session, *sendData); in PrepareData() 133 static int32_t PrepareAndSendDataServer(BindSession *session, CJson *jsonParams, bool *isNeedInform) in PrepareAndSendDataServer() argument [all …]
|
/base/security/deviceauth/services/frameworks/src/session/ |
D | session_manager.c | 123 void **session = NULL; in DestroySessionManager() local 124 FOR_EACH_HC_VECTOR(g_sessionManagerVec, index, session) { in DestroySessionManager() 125 if (session != NULL && (*session != NULL)) { in DestroySessionManager() 126 Session *temp = (Session *)(*session); in DestroySessionManager() 164 void **session = NULL; in RemoveOverTimeSession() local 166 session = g_sessionManagerVec.getp(&(g_sessionManagerVec), index); in RemoveOverTimeSession() 167 if (session == NULL || (*session == NULL)) { in RemoveOverTimeSession() 171 Session *ptr = (Session *)(*session); in RemoveOverTimeSession() 177 g_sessionManagerVec.eraseElement(&(g_sessionManagerVec), session, index); in RemoveOverTimeSession() 179 session = g_sessionManagerVec.getp(&(g_sessionManagerVec), index); in RemoveOverTimeSession() [all …]
|
/base/security/deviceauth/services/group_auth/src/session/auth_session/ |
D | auth_session_client.c | 26 static int32_t ProcessClientAuthSession(Session *session, CJson *in); 44 static int32_t ProcessClientAuthTask(AuthSession *session, int32_t moduleType, CJson *in, CJson *ou… in ProcessClientAuthTask() argument 47 … CJson *paramInSession = (session->paramsList).get(&(session->paramsList), session->currentIndex); in ProcessClientAuthTask() 52 int32_t res = ProcessTask(session->curTaskId, in, out, &status, moduleType); in ProcessClientAuthTask() 55 DestroyTask(session->curTaskId, moduleType); in ProcessClientAuthTask() 56 return InformAuthError(session, out, res); in ProcessClientAuthTask() 58 return ProcessTaskStatusForAuth(session, paramInSession, out, status); in ProcessClientAuthTask() 61 static int32_t StartClientAuthTask(AuthSession *session) in StartClientAuthTask() argument 63 … CJson *paramInSession = (session->paramsList).get(&(session->paramsList), session->currentIndex); in StartClientAuthTask() 71 InformLocalAuthError(paramInSession, session->base.callback); in StartClientAuthTask() [all …]
|
D | auth_session_server.c | 29 static int32_t ProcessServerAuthSession(Session *session, CJson *in); 144 static int32_t ProcessServerAuthTask(AuthSession *session, int32_t moduleType, CJson *in, CJson *ou… in ProcessServerAuthTask() argument 147 … CJson *paramInSession = (session->paramsList).get(&(session->paramsList), session->currentIndex); in ProcessServerAuthTask() 152 int32_t res = ProcessTask(session->curTaskId, in, out, &status, moduleType); in ProcessServerAuthTask() 156 if (InformAuthError(session, out, res) != HC_SUCCESS) { in ProcessServerAuthTask() 161 res = ProcessTaskStatusForAuth(session, paramInSession, out, status); in ProcessServerAuthTask() 165 static int32_t StartServerAuthTask(AuthSession *session, const CJson *receivedData) in StartServerAuthTask() argument 167 … CJson *paramInSession = (session->paramsList).get(&(session->paramsList), session->currentIndex); in StartServerAuthTask() 176 InformPeerAuthError(receivedData, session->base.callback); in StartServerAuthTask() 177 InformLocalAuthError(receivedData, session->base.callback); in StartServerAuthTask() [all …]
|
D | auth_session_common.c | 311 static int32_t AddGroupAuthTransmitData(const AuthSession *session, CJson *sendToPeer) in AddGroupAuthTransmitData() argument 313 ParamsVec list = session->paramsList; in AddGroupAuthTransmitData() 314 CJson *authParam = list.get(&list, session->currentIndex); in AddGroupAuthTransmitData() 330 if (isClient && (session->currentIndex < (list.size(&list) - 1))) { in AddGroupAuthTransmitData() 331 CJson *nextParam = list.get(&list, session->currentIndex + 1); in AddGroupAuthTransmitData() 345 static int32_t ReturnTransmitData(const AuthSession *session, CJson *out) in ReturnTransmitData() argument 352 CJson *authParam = (session->paramsList).get(&(session->paramsList), session->currentIndex); in ReturnTransmitData() 363 int32_t ret = AddGroupAuthTransmitData(session, sendToPeer); in ReturnTransmitData() 374 const DeviceAuthCallback *callback = session->base.callback; in ReturnTransmitData() 411 static void ReturnFinishData(const AuthSession *session, const CJson *out) in ReturnFinishData() argument [all …]
|
/base/security/deviceauth/services/group_manager/inc/session/ |
D | bind_session_common_util.h | 23 void DestroyBindSession(Session *session); 24 …d InitClientChannel(const DeviceAuthCallback *callback, const CJson *params, BindSession *session); 25 void InitServerChannel(const CJson *params, BindSession *session); 29 int32_t SendBindSessionData(const BindSession *session, const CJson *sendData); 30 int32_t CreateAndProcessModule(BindSession *session, const CJson *in, CJson *out); 31 int32_t ProcessModule(const BindSession *session, const CJson *in, CJson *out, int32_t *status); 32 void InformPeerGroupErrorIfNeed(bool isNeedInform, int32_t errorCode, const BindSession *session); 33 void InformPeerModuleError(CJson *out, const BindSession *session);
|
/base/security/deviceauth/services/group_manager/inc/session/bind_session/ |
D | bind_session_common.h | 21 int32_t AddInfoToSendData(bool isNeedCompatibleInfo, const BindSession *session, CJson *data); 22 int32_t GenerateBasicModuleParams(bool isClient, BindSession *session, CJson *moduleParams); 23 …nerateBindParams(int32_t osAccountId, int isClient, const CJson *jsonParams, BindSession *session); 25 bool NeedForceDelete(const BindSession *session); 26 int32_t ForceUnbindDevice(const BindSession *session); 27 int32_t ProcessBindSession(Session *session, CJson *jsonParams);
|
/base/security/deviceauth/services/group_manager/inc/session/bind_session_lite/ |
D | bind_session_common_lite.h | 21 void InitModuleType(const CJson *jsonParams, BindSession *session); 22 int32_t ProcessLiteBindSession(Session *session, CJson *jsonParams); 23 int32_t LiteSaveReceivedData(BindSession *session, const CJson *jsonParams); 24 int32_t LitePrepareAndSendData(BindSession *session, bool *isNeedInform);
|
/base/security/deviceauth/services/ |
D | deviceauth.gni | 36 "${group_auth_path}/inc/session", 37 "${group_auth_path}/inc/session/auth_session", 38 "${group_auth_path}/inc/session/auth_session_lite", 45 "${group_manager_path}/inc/session", 46 "${group_manager_path}/inc/session/bind_session", 47 "${group_manager_path}/inc/session/bind_session_lite", 48 "${group_manager_path}/inc/session/key_agree_session", 51 "${dev_frameworks_path}/inc/session", 73 "${group_auth_path}/src/session/auth_session_common_util.c", 76 "${group_manager_path}/src/session/bind_session_common_util.c", [all …]
|
/base/security/deviceauth/services/group_auth/inc/session/auth_session_lite/ |
D | auth_session_common_lite.h | 33 int32_t ReturnTransmitDataLite(const AuthSessionLite *session, CJson *out); 37 int32_t CreateAndProcessLiteTask(AuthSessionLite *session, CJson *out, int32_t *status); 38 int32_t ProcessLiteTaskStatusForAuth(const AuthSessionLite *session, CJson *out, int32_t status); 39 void DestroyAuthSessionLite(Session *session);
|
/base/security/deviceauth/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); 23 int32_t PrepareAndSendKeyAgreeData(BindSession *session, bool *isNeedInform);
|
/base/security/access_token/services/tokensyncmanager/src/remote/ |
D | soft_bus_session_listener.cpp | 37 int32_t SoftBusSessionListener::OnSessionOpened(int32_t session, int32_t result) in OnSessionOpened() argument 46 int32_t resultCode = ::GetPeerSessionName(session, contents, len); in OnSessionOpened() 57 ACCESSTOKEN_LOG_INFO(LABEL, "OnSessionOpened, id = %{public}d", session); in OnSessionOpened() 61 auto iter = g_SessionOpenedMap_.find(session); in OnSessionOpened() 63 g_SessionOpenedMap_.insert(std::pair<int32_t, int64_t>(session, (int64_t) 1)); in OnSessionOpened() 71 void SoftBusSessionListener::OnSessionClosed(int32_t session) in OnSessionClosed() argument 77 auto iter = g_SessionOpenedMap_.find(session); in OnSessionClosed()
|
D | soft_bus_channel.cpp | 67 int session = SoftBusManager::GetInstance().OpenSession(deviceId_); in BuildConnection() local 68 if (session == Constant::INVALID_SESSION) { in BuildConnection() 72 session_ = session; in BuildConnection() 184 void SoftBusChannel::HandleDataReceived(int session, const unsigned char *bytes, int length) in HandleDataReceived() argument 190 if (session <= 0 || length <= 0) { in HandleDataReceived() 191 …_LOG_ERROR(LABEL, "invalid params: session: %{public}d, data length: %{public}d", session, length); in HandleDataReceived() 212 … HandleRequest(session, message->GetId(), message->GetCommandName(), message->GetJsonPayload()); in HandleDataReceived() 317 int session = SoftBusManager::GetInstance().OpenSession(deviceId_); in CheckSessionMayReopenLocked() local 318 if (session != Constant::INVALID_SESSION) { in CheckSessionMayReopenLocked() 319 session_ = session; in CheckSessionMayReopenLocked() [all …]
|
/base/security/deviceauth/services/group_auth/inc/session/auth_session/ |
D | auth_session_common.h | 27 int32_t InformAuthError(AuthSession *session, const CJson *out, int errorCode); 29 int32_t ProcessTaskStatusForAuth(const AuthSession *session, const CJson *param, CJson *out, int32_… 30 int32_t CreateAndProcessTask(AuthSession *session, CJson *paramInSession, CJson *out, int32_t *stat… 32 void DestroyAuthSession(Session *session);
|
/base/account/os_account/services/accountmgr/include/appaccount/ |
D | app_account_authenticator_session.h | 36 explicit ClientDeathRecipient(AppAccountAuthenticatorSession *session); 40 void SetSession(AppAccountAuthenticatorSession *session); 47 explicit ServerDeathRecipient(AppAccountAuthenticatorSession *session); 51 void SetSession(AppAccountAuthenticatorSession *session); 58 explicit SessionConnection(AppAccountAuthenticatorSession *session); 64 void SetSession(AppAccountAuthenticatorSession *session);
|
/base/account/os_account/services/accountmgr/src/appaccount/ |
D | app_account_authenticator_session.cpp | 30 …ntDeathRecipient::ClientDeathRecipient(AppAccountAuthenticatorSession *session) : session_(session) in ClientDeathRecipient() argument 43 void ClientDeathRecipient::SetSession(AppAccountAuthenticatorSession *session) in SetSession() argument 46 session_ = session; in SetSession() 49 …erDeathRecipient::ServerDeathRecipient(AppAccountAuthenticatorSession *session) : session_(session) in ServerDeathRecipient() argument 62 void ServerDeathRecipient::SetSession(AppAccountAuthenticatorSession *session) in SetSession() argument 65 session_ = session; in SetSession() 68 SessionConnection::SessionConnection(AppAccountAuthenticatorSession *session) : session_(session) in SessionConnection() argument 95 void SessionConnection::SetSession(AppAccountAuthenticatorSession *session) in SetSession() argument 98 session_ = session; in SetSession()
|