/base/security/device_auth/services/session_manager/src/session/ |
H A D | dev_session_fwk.c | 285 static int32_t ParseAllRecvEvent(SessionImpl *impl, const CJson *receviedMsg) in ParseAllRecvEvent() argument 287 CJson *sessionMsg = GetObjFromJson(receviedMsg, FIELD_MSG); in ParseAllRecvEvent() 289 LOGE("get sessionMsg from receviedMsg fail."); in ParseAllRecvEvent() 319 static bool IsV1SessionMsg(const CJson *receviedMsg) in IsV1SessionMsg() argument 321 return (GetObjFromJson(receviedMsg, FIELD_MSG) == NULL); in IsV1SessionMsg() 324 static int32_t AddChannelInfoToParams(SessionImpl *impl, CJson *receviedMsg) in AddChannelInfoToParams() argument 336 if (AddIntToJson(receviedMsg, FIELD_CHANNEL_TYPE, channelType) != HC_SUCCESS) { in AddChannelInfoToParams() 340 if (AddByteToJson(receviedMsg, FIELD_CHANNEL_ID, (uint8_t *)&channelId, sizeof(int64_t)) != HC_SUCCESS) { in AddChannelInfoToParams() 347 static int32_t CombindServerBindParams(SessionImpl *impl, CJson *receviedMsg) in CombindServerBindParams() argument 354 if (AddIntToJson(receviedMsg, FIELD_OS_ACCOUNT_I in CombindServerBindParams() 367 CombindServerAuthParams(SessionImpl *impl, CJson *receviedMsg) CombindServerAuthParams() argument 380 AddConfirmationToParams(const CJson *context, CJson *receviedMsg) AddConfirmationToParams() argument 391 CombineServerParams(SessionImpl *impl, bool isBind, CJson *receviedMsg) CombineServerParams() argument 404 InitServerV1Session(SessionImpl *impl, const CJson *receviedMsg) InitServerV1Session() argument 422 ProcV1SessionMsg(SessionImpl *impl, const CJson *receviedMsg, bool *isFinish) ProcV1SessionMsg() argument 443 HasNextAuthGroup(const CJson *receviedMsg) HasNextAuthGroup() argument 448 GenerateErrorReturn(const CJson *receviedMsg, char **errorReturn) GenerateErrorReturn() argument 488 OnV1SessionError(SessionImpl *impl, int32_t errorCode, const CJson *receviedMsg) OnV1SessionError() argument 499 ProcV1Session(SessionImpl *impl, const CJson *receviedMsg, bool *isFinish) ProcV1Session() argument 560 ProcV2Session(SessionImpl *impl, const CJson *receviedMsg, bool *isFinish) ProcV2Session() argument 592 ProcessSession(DevSession *self, const CJson *receviedMsg, bool *isFinish) ProcessSession() argument [all...] |
/base/security/device_auth/services/session_manager/src/session/v2/expand_sub_session/ |
H A D | expand_sub_session.c | 142 static int32_t GetRecvEncData(const CJson *receviedMsg, Uint8Buff *recvEncData) in GetRecvEncData() argument 144 const char *base64Str = GetStringFromJson(receviedMsg, FIELD_ENC_DATA); in GetRecvEncData() 167 static int32_t GetRecvCmdList(ExpandSubSessionImpl *impl, const CJson *receviedMsg, CJson **cmdList) in GetRecvCmdList() argument 170 int32_t res = GetRecvEncData(receviedMsg, &recvEncData); in GetRecvCmdList() 272 static int32_t ProcAllRecvCmds(ExpandSubSessionImpl *impl, const CJson *receviedMsg, CJson *sendCmdList) in ProcAllRecvCmds() argument 275 int32_t res = GetRecvCmdList(impl, receviedMsg, &recvCmdList); in ProcAllRecvCmds() 450 static int32_t ProcessExpandSubSession(ExpandSubSession *self, const CJson *receviedMsg, in ProcessExpandSubSession() argument 453 if ((self == NULL) || (receviedMsg == NULL) || (returnSendMsg == NULL)) { in ProcessExpandSubSession() 469 res = ProcAllRecvCmds(impl, receviedMsg, sendCmdList); in ProcessExpandSubSession()
|
/base/security/device_auth/services/session_manager/inc/ |
H A D | dev_session_mgr.h | 32 int32_t ProcessDevSession(int64_t sessionId, const CJson *receviedMsg, bool *isFinish);
|
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/ |
H A D | auth_sub_session.c | 77 static int32_t ProcessAuthSubSession(AuthSubSession *self, const CJson *receviedMsg, CJson **returnSendMsg) in ProcessAuthSubSession() argument 79 if ((self == NULL) || (receviedMsg == NULL) || (returnSendMsg == NULL)) { in ProcessAuthSubSession() 85 int32_t res = protocol->process(protocol, receviedMsg, returnSendMsg); in ProcessAuthSubSession()
|
/base/security/device_auth/services/session_manager/src/session/v2/expand_sub_session/expand_process_lib/ |
H A D | auth_code_import.c | 444 static int32_t DecodeEvent(const CJson *receviedMsg) in DecodeEvent() argument 446 if (receviedMsg == NULL) { in DecodeEvent() 450 if (GetIntFromJson(receviedMsg, FIELD_EVENT, &event) != HC_SUCCESS) { in DecodeEvent() 451 LOGE("get event from receviedMsg fail."); in DecodeEvent() 461 static int32_t SwitchState(BaseCmd *self, const CJson *receviedMsg, CJson **returnSendMsg, CmdState *returnState) in SwitchState() argument 463 int32_t eventType = DecodeEvent(receviedMsg); in SwitchState() 466 int32_t res = STATE_MACHINE[i].stateProcessFunc(self, receviedMsg, returnSendMsg); in SwitchState() 496 static int32_t ProcessAuthCodeImportCmd(BaseCmd *self, const CJson *receviedMsg, in ProcessAuthCodeImportCmd() argument 499 if ((self == NULL) || (receviedMsg == NULL) || (returnSendMsg == NULL) || (returnState == NULL)) { in ProcessAuthCodeImportCmd() 507 return SwitchState(self, receviedMsg, returnSendMs in ProcessAuthCodeImportCmd() [all...] |
H A D | pub_key_exchange.c | 609 static int32_t DecodeEvent(const CJson *receviedMsg) in DecodeEvent() argument 611 if (receviedMsg == NULL) { in DecodeEvent() 615 if (GetIntFromJson(receviedMsg, FIELD_EVENT, &event) != HC_SUCCESS) { in DecodeEvent() 616 LOGE("get event from receviedMsg fail."); in DecodeEvent() 626 static int32_t SwitchState(BaseCmd *self, const CJson *receviedMsg, CJson **returnSendMsg, CmdState *returnState) in SwitchState() argument 628 int32_t eventType = DecodeEvent(receviedMsg); in SwitchState() 631 int32_t res = STATE_MACHINE[i].stateProcessFunc(self, receviedMsg, returnSendMsg); in SwitchState() 661 static int32_t ProcessPubKeyExchangeCmd(BaseCmd *self, const CJson *receviedMsg, in ProcessPubKeyExchangeCmd() argument 664 if ((self == NULL) || (receviedMsg == NULL) || (returnSendMsg == NULL) || (returnState == NULL)) { in ProcessPubKeyExchangeCmd() 672 return SwitchState(self, receviedMsg, returnSendMs in ProcessPubKeyExchangeCmd() [all...] |
H A D | save_trusted_info.c | 713 static int32_t DecodeEvent(const CJson *receviedMsg) in DecodeEvent() argument 715 if (receviedMsg == NULL) { in DecodeEvent() 719 if (GetIntFromJson(receviedMsg, FIELD_EVENT, &event) != HC_SUCCESS) { in DecodeEvent() 720 LOGE("get event from receviedMsg fail."); in DecodeEvent() 730 static int32_t SwitchState(BaseCmd *self, const CJson *receviedMsg, CJson **returnSendMsg, CmdState *returnState) in SwitchState() argument 732 int32_t eventType = DecodeEvent(receviedMsg); in SwitchState() 735 int32_t res = STATE_MACHINE[i].stateProcessFunc(self, receviedMsg, returnSendMsg); in SwitchState() 765 static int32_t ProcessSaveTrustedInfoCmd(BaseCmd *self, const CJson *receviedMsg, in ProcessSaveTrustedInfoCmd() argument 768 if ((self == NULL) || (receviedMsg == NULL) || (returnSendMsg == NULL) || (returnState == NULL)) { in ProcessSaveTrustedInfoCmd() 776 return SwitchState(self, receviedMsg, returnSendMs in ProcessSaveTrustedInfoCmd() [all...] |
/base/security/device_auth/services/session_manager/inc/session/ |
H A D | dev_session_fwk.h | 35 int32_t (*process)(DevSession *self, const CJson *receviedMsg, bool *isFinish);
|
/base/security/device_auth/services/session_manager/inc/session/v2/expand_sub_session/ |
H A D | expand_sub_session.h | 33 int32_t (*process)(ExpandSubSession *self, const CJson *receviedMsg, CJson **returnSendMsg);
|
/base/security/device_auth/services/session_manager/inc/session/v2/auth_sub_session/ |
H A D | auth_sub_session.h | 33 int32_t (*process)(AuthSubSession *self, const CJson *receviedMsg, CJson **returnSendMsg);
|
/base/security/device_auth/services/session_manager/src/ |
H A D | dev_session_mgr.c | 182 int32_t ProcessDevSession(int64_t sessionId, const CJson *receviedMsg, bool *isFinish) in ProcessDevSession() argument 184 if ((receviedMsg == NULL) || (isFinish == NULL)) { in ProcessDevSession() 198 res = session->process(session, receviedMsg, isFinish); in ProcessDevSession()
|
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/protocol_lib/ |
H A D | dl_speke_protocol.c | 966 static int32_t DecodeEvent(const CJson *receviedMsg) in DecodeEvent() argument 968 if (receviedMsg == NULL) { in DecodeEvent() 972 if (GetIntFromJson(receviedMsg, FIELD_EVENT, &event) != HC_SUCCESS) { in DecodeEvent() 973 LOGE("get event from receviedMsg fail."); in DecodeEvent() 983 static int32_t DlSpekeProtocolSwitchState(BaseProtocol *self, const CJson *receviedMsg, CJson **returnSendMsg) in DlSpekeProtocolSwitchState() argument 985 int32_t eventType = DecodeEvent(receviedMsg); in DlSpekeProtocolSwitchState() 988 int32_t res = STATE_MACHINE[i].stateProcessFunc((DlSpekeProtocol *)self, receviedMsg, returnSendMsg); in DlSpekeProtocolSwitchState() 1016 static int32_t ProcessDlSpekeProtocol(BaseProtocol *self, const CJson *receviedMsg, CJson **returnSendMsg) in ProcessDlSpekeProtocol() argument 1018 if ((self == NULL) || (receviedMsg == NULL) || (returnSendMsg == NULL)) { in ProcessDlSpekeProtocol() 1026 return DlSpekeProtocolSwitchState(self, receviedMsg, returnSendMs in ProcessDlSpekeProtocol() [all...] |
H A D | ec_speke_protocol.c | 961 static int32_t DecodeEvent(const CJson *receviedMsg) in DecodeEvent() argument 963 if (receviedMsg == NULL) { in DecodeEvent() 967 if (GetIntFromJson(receviedMsg, FIELD_EVENT, &event) != HC_SUCCESS) { in DecodeEvent() 968 LOGE("get event from receviedMsg fail."); in DecodeEvent() 978 static int32_t EcSpekeProtocolSwitchState(BaseProtocol *self, const CJson *receviedMsg, CJson **returnSendMsg) in EcSpekeProtocolSwitchState() argument 980 int32_t eventType = DecodeEvent(receviedMsg); in EcSpekeProtocolSwitchState() 983 int32_t res = STATE_MACHINE[i].stateProcessFunc((EcSpekeProtocol *)self, receviedMsg, returnSendMsg); in EcSpekeProtocolSwitchState() 1011 static int32_t ProcessEcSpekeProtocol(BaseProtocol *self, const CJson *receviedMsg, CJson **returnSendMsg) in ProcessEcSpekeProtocol() argument 1013 if ((self == NULL) || (receviedMsg == NULL) || (returnSendMsg == NULL)) { in ProcessEcSpekeProtocol() 1021 return EcSpekeProtocolSwitchState(self, receviedMsg, returnSendMs in ProcessEcSpekeProtocol() [all...] |
H A D | iso_protocol.c | 319 LOGE("get randC from receviedMsg fail."); in ServerGenTokenParseEvent() 324 LOGE("get authIdCStr from receviedMsg fail."); in ServerGenTokenParseEvent() 448 LOGE("get tokenS from receviedMsg fail."); in ClientGenTokenParseEvent() 533 LOGE("get tokenC from receviedMsg fail."); in ServerGenSessKeyParseEvent() 705 static int32_t DecodeEvent(const CJson *receviedMsg) in DecodeEvent() argument 707 if (receviedMsg == NULL) { in DecodeEvent() 711 if (GetIntFromJson(receviedMsg, FIELD_EVENT, &event) != HC_SUCCESS) { in DecodeEvent() 712 LOGE("get event from receviedMsg fail."); in DecodeEvent() 722 static int32_t IsoProtocolSwitchState(BaseProtocol *self, const CJson *receviedMsg, CJson **returnSendMsg) in IsoProtocolSwitchState() argument 724 int32_t eventType = DecodeEvent(receviedMsg); in IsoProtocolSwitchState() 755 ProcessIsoProtocol(BaseProtocol *self, const CJson *receviedMsg, CJson **returnSendMsg) ProcessIsoProtocol() argument [all...] |
/base/security/device_auth/services/session_manager/src/session/v2/ |
H A D | dev_session_v2.c | 1869 static int32_t ProcAuthSubSessionMsg(AuthSubSession *authSubSession, const CJson *receviedMsg, CJson *sessionMsg, in ProcAuthSubSessionMsg() argument 1873 int32_t res = authSubSession->process(authSubSession, receviedMsg, &authData); in ProcAuthSubSessionMsg()
|