Home
last modified time | relevance | path

Searched refs:session (Results 1 – 25 of 46) sorted by relevance

12

/base/security/device_auth/services/session_manager/src/session/v1/
Dcompatible_sub_session.c23 const DeviceAuthCallback *callback, CompatibleBaseSubSession **session) 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()
45 int32_t ProcessCompatibleSubSession(CompatibleBaseSubSession *session, CJson *in, CJson **out, int3… in ProcessCompatibleSubSession() argument
47 if (session == NULL || in == NULL || out == NULL || status == NULL) { in ProcessCompatibleSubSession()
51 switch (session->type) { in ProcessCompatibleSubSession()
53 return ProcessClientBindSubSession(session, in, out, status); in ProcessCompatibleSubSession()
[all …]
/base/security/device_auth/services/session_manager/src/
Ddev_session_mgr.c28 DevSession *session; member
43 DevSession *session = ptr->session; in GetSessionInfo() local
44 if (session->id == sessionId) { in GetSessionInfo()
62 DevSession *session = sessionInfo->session; in RemoveTimeoutSession() local
63 LOGI("session timeout. [AppId]: %s, [Id]: %" PRId64, session->appId, session->id); in RemoveTimeoutSession()
65 … ProcessErrorCallback(session->id, session->opCode, HC_ERR_TIME_OUT, NULL, &session->callback); in RemoveTimeoutSession()
66 session->destroy(session); in RemoveTimeoutSession()
88 static int32_t AddNewSessionToList(DevSession *session) in AddNewSessionToList() argument
91 newSessionInfo.session = session; in AddNewSessionToList()
117 ptr->session->destroy(ptr->session); in DestroyDevSessionManager()
[all …]
/base/security/device_auth/services/session_manager/src/session/v1/compatible_auth_sub_session/
Dcompatible_auth_sub_session.c41 const DeviceAuthCallback *callback, CompatibleBaseSubSession **session) in CreateClientAuthSubSessionInner() argument
68 *session = (CompatibleBaseSubSession *)subSession; in CreateClientAuthSubSessionInner()
98 static int32_t CheckPeerGroupAuthMsg(CompatibleAuthSubSession *session, CJson *receivedData) in CheckPeerGroupAuthMsg() argument
103 if (AuthOnNextGroupIfExist(session) != HC_SUCCESS) { in CheckPeerGroupAuthMsg()
110 static int32_t ProcessClientAuthTaskInner(CompatibleAuthSubSession *session, int32_t moduleType, CJ… in ProcessClientAuthTaskInner() argument
113 … CJson *paramInSession = (session->paramsList).get(&(session->paramsList), session->currentIndex); in ProcessClientAuthTaskInner()
119 int32_t res = ProcessTask(session->base.curTaskId, in, out, status, moduleType); in ProcessClientAuthTaskInner()
124 DestroyTask(session->base.curTaskId, moduleType); in ProcessClientAuthTaskInner()
125 return ProcessClientAuthError(session, out); in ProcessClientAuthTaskInner()
127 return HandleAuthTaskStatus(session, out, *status); in ProcessClientAuthTaskInner()
[all …]
Dcompatible_auth_sub_session_common.c371 static int32_t ReturnTransmitData(const CompatibleAuthSubSession *session, CJson *out) in ReturnTransmitData() argument
378 CJson *authParam = (session->paramsList).get(&(session->paramsList), session->currentIndex); in ReturnTransmitData()
389 int32_t ret = AddGroupAuthTransmitData(session, sendToPeer); in ReturnTransmitData()
400 const DeviceAuthCallback *callback = session->base.callback; in ReturnTransmitData()
419 static void ReturnFinishData(const CompatibleAuthSubSession *session, const CJson *out) in ReturnFinishData() argument
421 ParamsVecForAuth list = session->paramsList; in ReturnFinishData()
422 const CJson *authParam = list.get(&list, session->currentIndex); in ReturnFinishData()
440 groupAuth->onFinish(requestId, authParam, out, session->base.callback); in ReturnFinishData()
445 int32_t AuthOnNextGroupIfExist(CompatibleAuthSubSession *session) in AuthOnNextGroupIfExist() argument
447 if (session->currentIndex >= session->paramsList.size(&session->paramsList) - 1) { in AuthOnNextGroupIfExist()
[all …]
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/
Dcompatible_bind_sub_session.c106 const DeviceAuthCallback *callback, CompatibleBaseSubSession **session) in CreateBaseBindSubSession() argument
143 *session = (CompatibleBaseSubSession *)subSession; in CreateBaseBindSubSession()
202 static int32_t GenerateServerBindParams(CompatibleBindSubSession *session, CJson *jsonParams) in GenerateServerBindParams() argument
204 … int32_t result = CheckServerStatusIfNotInvite(session->osAccountId, session->opCode, jsonParams); in GenerateServerBindParams()
208 result = GenerateBaseBindParams(session->osAccountId, SERVER, jsonParams, session); in GenerateServerBindParams()
213 return GenerateKeyPairIfNeeded(SERVER, session->opCode, jsonParams); in GenerateServerBindParams()
227 …atic int32_t TryAddPeerUserTypeToParams(const CJson *jsonParams, CompatibleBindSubSession *session) in TryAddPeerUserTypeToParams() argument
231 …if (res == HC_SUCCESS && AddIntToJson(session->params, FIELD_PEER_USER_TYPE, peerUserType) != HC_S… in TryAddPeerUserTypeToParams()
238 static int32_t InteractWithPeer(const CompatibleBindSubSession *session, CJson *sendData) in InteractWithPeer() argument
240 int32_t res = AddInfoToBindData(false, session, sendData); in InteractWithPeer()
[all …]
Dcompatible_bind_sub_session_common.c22 static int32_t AddPinCode(const CJson *jsonParams, CompatibleBindSubSession *session) in AddPinCode() argument
29 if (AddStringToJson(session->params, FIELD_PIN_CODE, pinCode) != HC_SUCCESS) { in AddPinCode()
337 CompatibleBindSubSession *session) in AddGroupAndDevInfo() argument
344 if (IsCreateGroupNeeded(isClient, session->opCode)) { in AddGroupAndDevInfo()
345 return GenerateParamsByInput(osAccountId, groupId, jsonParams, session->params); in AddGroupAndDevInfo()
347 return GenerateParamsByDatabase(osAccountId, groupId, session->params); in AddGroupAndDevInfo()
351 …tic int32_t AddPeerAuthIdAndUdidIfExist(const CJson *jsonParams, CompatibleBindSubSession *session) in AddPeerAuthIdAndUdidIfExist() argument
354 …if (peerAuthId != NULL && AddStringToJson(session->params, FIELD_PEER_AUTH_ID, peerAuthId) != HC_S… in AddPeerAuthIdAndUdidIfExist()
359 …if (peerUdid != NULL && AddStringToJson(session->params, FIELD_PEER_UDID, peerUdid) != HC_SUCCESS)… in AddPeerAuthIdAndUdidIfExist()
366 static int32_t AddGroupAndDevInfoToParams(const CompatibleBindSubSession *session, CJson *modulePar… in AddGroupAndDevInfoToParams() argument
[all …]
Dcompatible_bind_sub_session_util.c109 static int32_t AddGroupErrorInfo(int32_t errorCode, const CompatibleBindSubSession *session, in AddGroupErrorInfo() argument
116 if (AddStringToJson(errorData, FIELD_APP_ID, session->base.appId) != HC_SUCCESS) { in AddGroupErrorInfo()
120 if (AddInt64StringToJson(errorData, FIELD_REQUEST_ID, session->reqId) != HC_SUCCESS) { in AddGroupErrorInfo()
160 int32_t CreateAndProcessBindTask(CompatibleBindSubSession *session, const CJson *in, CJson *out, in… in CreateAndProcessBindTask() argument
162 LOGI("Start to create and process module task! [ModuleType]: %d", session->moduleType); in CreateAndProcessBindTask()
164 int32_t res = CreateTask(&(session->base.curTaskId), in, out, session->moduleType); in CreateAndProcessBindTask()
171 res = ProcessTask(session->base.curTaskId, in, out, status, session->moduleType); in CreateAndProcessBindTask()
181 int32_t TransmitBindSessionData(const CompatibleBindSubSession *session, const CJson *sendData) in TransmitBindSessionData() argument
189 int32_t res = HcSendMsg(session->channelType, session->reqId, session->channelId, in TransmitBindSessionData()
190 session->base.callback, sendDataStr); in TransmitBindSessionData()
[all …]
/base/account/os_account/services/accountmgr/src/appaccount/
Dapp_account_authenticator_session_manager.cpp87 … auto session = std::make_shared<AppAccountAuthenticatorSession>(ADD_ACCOUNT_IMPLICITLY, request); in AddAccountImplicitly() local
88 return OpenSession(session); in AddAccountImplicitly()
93 …auto session = std::make_shared<AppAccountAuthenticatorSession>(CREATE_ACCOUNT_IMPLICITLY, request… in CreateAccountImplicitly() local
94 return OpenSession(session); in CreateAccountImplicitly()
99 auto session = std::make_shared<AppAccountAuthenticatorSession>(AUTHENTICATE, request); in Authenticate() local
100 return OpenSession(session); in Authenticate()
105 auto session = std::make_shared<AppAccountAuthenticatorSession>(AUTH, request); in Auth() local
106 return OpenSession(session); in Auth()
111 auto session = std::make_shared<AppAccountAuthenticatorSession>(VERIFY_CREDENTIAL, request); in VerifyCredential() local
112 return OpenSession(session); in VerifyCredential()
[all …]
/base/security/device_auth/services/key_agree_sdk/src/
Dkey_agree_session_manager.c25 KeyAgreeSession *session; member
76 static uint32_t AddSessionInner(KeyAgreeSession *session, SpekeSession *spekeSession) in AddSessionInner() argument
78 if (session == NULL) { in AddSessionInner()
90 sessionNode.session = session; in AddSessionInner()
96 static uint32_t DeleteSessionInner(KeyAgreeSession *session) in DeleteSessionInner() argument
98 if (session == NULL) { in DeleteSessionInner()
109 if ((sessionNode != NULL) && (sessionNode->session != NULL) && in DeleteSessionInner()
110 (sessionNode->session->sessionId == session->sessionId)) { in DeleteSessionInner()
120 static SpekeSession *GetSessionInner(KeyAgreeSession *session) in GetSessionInner() argument
122 if (session == NULL) { in GetSessionInner()
[all …]
Dkey_agree_sdk.c147 KeyAgreeResult KeyAgreeInitSession(KeyAgreeSession *session, KeyAgreeProtocol protocol, KeyAgreeTyp… in KeyAgreeInitSession() argument
150 if (session == NULL) { in KeyAgreeInitSession()
164 spekeSession->sessionId = session->sessionId; in KeyAgreeInitSession()
181 if (GetManagerInstance()->addSession(session, spekeSession) != HC_SUCCESS) { in KeyAgreeInitSession()
190 KeyAgreeResult KeyAgreeStartSession(KeyAgreeSession *session, const KeyAgreeBlob *sharedSecret, in KeyAgreeStartSession() argument
194 if ((sharedSecret == NULL) || (deviceId == NULL) || (session == NULL)) { in KeyAgreeStartSession()
202 SpekeSession *spekeSession = GetManagerInstance()->getSession(session); in KeyAgreeStartSession()
216 KeyAgreeResult KeyAgreeGenerateNextMessage(KeyAgreeSession *session, const KeyAgreeBlob *messageRec… in KeyAgreeGenerateNextMessage() argument
220 if ((session == NULL) || (messageToTransmit == NULL)) { in KeyAgreeGenerateNextMessage()
237 SpekeSession *spekeSession = GetManagerInstance()->getSession(session); in KeyAgreeGenerateNextMessage()
[all …]
/base/security/device_auth/services/session_manager/inc/session/v1/compatible_auth_sub_session/
Dcompatible_auth_sub_session_common.h31 int32_t CreateAndProcessAuthTask(CompatibleAuthSubSession *session, CJson *paramInSession, CJson *o…
34 int32_t ProcessClientAuthError(CompatibleAuthSubSession *session, const CJson *out);
35 void ProcessServerAuthError(CompatibleAuthSubSession *session, const CJson *out);
36 int32_t AddGroupAuthTransmitData(const CompatibleAuthSubSession *session, CJson *sendToPeer);
37 int32_t HandleAuthTaskStatus(const CompatibleAuthSubSession *session, CJson *out, int32_t status);
39 int32_t AuthOnNextGroupIfExist(CompatibleAuthSubSession *session);
Dcompatible_auth_sub_session.h25 …tAuthSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSubSession **session);
26 …rAuthSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSubSession **session);
27 int32_t ProcessClientAuthSubSession(CompatibleBaseSubSession *session, CJson *in, CJson **out, int3…
28 int32_t ProcessServerAuthSubSession(CompatibleBaseSubSession *session, CJson *in, int32_t *status);
29 void DestroyCompatibleAuthSubSession(CompatibleBaseSubSession *session);
/base/security/device_auth/services/session_manager/inc/session/v1/compatible_bind_sub_session/
Dcompatible_bind_sub_session.h25 …tBindSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSubSession **session);
26 …rBindSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSubSession **session);
27 int32_t ProcessClientBindSubSession(CompatibleBaseSubSession *session, CJson *in, CJson **out, int3…
28 int32_t ProcessServerBindSubSession(CompatibleBaseSubSession *session, CJson *in, int32_t *status);
29 void DestroyCompatibleBindSubSession(CompatibleBaseSubSession *session);
Dcompatible_bind_sub_session_common.h27 CompatibleBindSubSession *session);
28 int32_t GenerateBaseModuleParams(bool isClient, CompatibleBindSubSession *session, CJson *modulePar…
29 int32_t AddInfoToBindData(bool isNeedCompatibleInfo, const CompatibleBindSubSession *session, CJson…
Dcompatible_bind_sub_session_util.h25 int32_t CreateAndProcessBindTask(CompatibleBindSubSession *session, const CJson *in, CJson *out, in…
26 int32_t TransmitBindSessionData(const CompatibleBindSubSession *session, const CJson *sendData);
28 …rGroupErrorIfNeeded(bool isNeedInform, int32_t errorCode, const CompatibleBindSubSession *session);
/base/powermgr/power_manager/power_dialog/entry/src/main/ets/UiExtensionAbility/
DPowerUiExtensionAbility.ts19 onSessionCreate(want, session): void {
21 'session': session
23 session.loadContent('pages/powerDialog', storage);
24 session.setWindowBackgroundColor('#00000000');
/base/account/os_account/services/accountmgr/test/moduletest/app_account/
Dapp_account_authenticator_session_manager_module_test.cpp239 std::shared_ptr<AppAccountAuthenticatorSession> session = nullptr; variable
240 ErrCode result = appAccountAuthenticatorSessionManagerPtr_->OpenSession(session);
254 session = std::make_shared<AppAccountAuthenticatorSession>(action, request);
255 ASSERT_NE(session, nullptr);
256 result = appAccountAuthenticatorSessionManagerPtr_->OpenSession(session);
273 auto session = std::make_shared<AppAccountAuthenticatorSession>(action, request); variable
274 ASSERT_NE(session, nullptr);
276 appAccountAuthenticatorSessionManagerPtr_->sessionMap_[key] = session;
278 ErrCode result = appAccountAuthenticatorSessionManagerPtr_->OpenSession(session);
302 auto session = std::make_shared<AppAccountAuthenticatorSession>(action, request); variable
[all …]
/base/security/device_auth/services/key_agree_sdk/inc/
Dkey_agree_sdk.h96 KeyAgreeResult KeyAgreeInitSession(KeyAgreeSession *session, KeyAgreeProtocol protocol, KeyAgreeTyp…
97 KeyAgreeResult KeyAgreeStartSession(KeyAgreeSession *session, const KeyAgreeBlob *sharedSecret,
99 KeyAgreeResult KeyAgreeGenerateNextMessage(KeyAgreeSession *session, const KeyAgreeBlob *messageRec…
101 KeyAgreeResult KeyAgreeIsFinish(KeyAgreeSession *session);
102 KeyAgreeResult KeyAgreeGetResult(KeyAgreeSession *session, KeyAgreeBlob *sessionKey);
103 void KeyAgreeFreeSession(KeyAgreeSession *session);
/base/msdp/device_status/services/interaction/drag/include/
Dstate_change_notify.h36 SessionPtr session { nullptr };
40 if (info == nullptr || info->session == nullptr) {
43 return session->GetPid() == info->session->GetPid();
52 void OnStateChangedNotify(SessionPtr session, MessageId msId, DragState state);
/base/security/device_auth/services/session_manager/src/session/
Ddev_session_fwk.c505 static int32_t BuildDevSessionByContext(const CJson *context, SessionImpl *session) in BuildDevSessionByContext() argument
527 session->base.opCode = opCode; in BuildDevSessionByContext()
528 session->channelType = channelType; in BuildDevSessionByContext()
529 session->channelId = channelId; in BuildDevSessionByContext()
530 session->isClient = isClient; in BuildDevSessionByContext()
534 …ldDevSession(int64_t sessionId, const char *appId, SessionInitParams *params, SessionImpl *session) in BuildDevSession() argument
536 int32_t res = BuildDevSessionByContext(params->context, session); in BuildDevSession()
540 res = DeepCopyString(appId, &session->base.appId); in BuildDevSession()
548 HcFree(session->base.appId); in BuildDevSession()
551 session->base.id = sessionId; in BuildDevSession()
[all …]
/base/security/device_auth/services/
Ddeviceauth.gni51 "${dev_frameworks_path}/inc/session",
71 "${session_manager_path}/inc/session",
72 "${session_manager_path}/inc/session/v1",
73 "${session_manager_path}/inc/session/v1/compatible_bind_sub_session",
74 "${session_manager_path}/inc/session/v1/compatible_auth_sub_session",
75 "${session_manager_path}/inc/session/v2",
76 "${session_manager_path}/inc/session/v2/auth_sub_session",
77 "${session_manager_path}/inc/session/v2/auth_sub_session/protocol_lib",
78 "${session_manager_path}/inc/session/v2/expand_sub_session",
79 "${session_manager_path}/inc/session/v2/expand_sub_session/expand_process_lib",
[all …]
/base/security/device_auth/services/session_manager/inc/session/v1/
Dcompatible_sub_session.h26 const DeviceAuthCallback *callback, CompatibleBaseSubSession **session);
27 int32_t ProcessCompatibleSubSession(CompatibleBaseSubSession *session, CJson *in, CJson **out, int3…
28 void DestroyCompatibleSubSession(CompatibleBaseSubSession *session);
/base/msdp/device_status/services/interaction/drag/src/
Dstate_change_notify.cpp68 OnStateChangedNotify(info->session, info->msgId, state); in StateChangedNotify()
73 void StateChangeNotify::OnStateChangedNotify(SessionPtr session, MessageId msgId, DragState state) in OnStateChangedNotify() argument
76 CHKPV(session); in OnStateChangedNotify()
83 if (!session->SendMsg(pkt)) { in OnStateChangedNotify()
/base/security/device_auth/
DBUILD.gn70 …"test/unittest/tdd_framework/unit_test/services/session_manager/session/v2/auth_sub_session:auth_s…
71 …"test/unittest/tdd_framework/unit_test/services/session_manager/session/v2/auth_sub_session/protoc…
72 …"test/unittest/tdd_framework/unit_test/services/session_manager/session/v2/auth_sub_session/protoc…
73 …"test/unittest/tdd_framework/unit_test/services/session_manager/session/v2/expand_sub_session:expa…
74 …"test/unittest/tdd_framework/unit_test/services/session_manager/session/v2/expand_sub_session/expa…
75 …"test/unittest/tdd_framework/unit_test/services/session_manager/session/v2/expand_sub_session/expa…
76 …"test/unittest/tdd_framework/unit_test/services/session_manager/session/v2/expand_sub_session/expa…
/base/security/access_token/services/tokensyncmanager/src/remote/
Dsoft_bus_channel.cpp69 int session = SoftBusManager::GetInstance().OpenSession(deviceId_); in BuildConnection() local
70 if (session == Constant::INVALID_SESSION) { in BuildConnection()
74 session_ = session; in BuildConnection()
198 void SoftBusChannel::HandleDataReceived(int session, const unsigned char *bytes, int length) in HandleDataReceived() argument
204 if (session <= 0 || length <= 0) { in HandleDataReceived()
205 …_LOG_ERROR(LABEL, "invalid params: session: %{public}d, data length: %{public}d", session, length); in HandleDataReceived()
226 … HandleRequest(session, message->GetId(), message->GetCommandName(), message->GetJsonPayload()); in HandleDataReceived()
330 int session = SoftBusManager::GetInstance().OpenSession(deviceId_); in CheckSessionMayReopenLocked() local
331 if (session != Constant::INVALID_SESSION) { in CheckSessionMayReopenLocked()
332 session_ = session; in CheckSessionMayReopenLocked()
[all …]

12