Home
last modified time | relevance | path

Searched refs:opCode (Results 1 – 25 of 49) sorted by relevance

12

/base/security/device_auth/services/authenticators/src/account_related/
Daccount_module.c43 int32_t opCode; in CheckAccountMsgRepeatability() local
44 if (GetIntFromJson(in, FIELD_OPERATION_CODE, &opCode) != CLIB_SUCCESS) { in CheckAccountMsgRepeatability()
49 if (opCode == OP_BIND) { in CheckAccountMsgRepeatability()
51 } else if (opCode == AUTHENTICATE) { in CheckAccountMsgRepeatability()
54 LOGE("Invalid opCode: %d.", opCode); in CheckAccountMsgRepeatability()
130 static int32_t ProcessAsyTokens(int32_t osAccountId, int32_t opCode, CJson *in, CJson *out) in ProcessAsyTokens() argument
132 switch (opCode) { in ProcessAsyTokens()
135 return GetAccountAuthTokenManager()->addToken(osAccountId, opCode, in); in ProcessAsyTokens()
157 LOGE("Operation is not supported for: %d.", opCode); in ProcessAsyTokens()
162 static int32_t ProcessSymTokens(int32_t osAccountId, int32_t opCode, CJson *in, CJson *out) in ProcessSymTokens() argument
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/
Dpake_task_common.c41 if (params->opCode == AUTHENTICATE) { in ConstructOutJson()
87 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_OPERATION_CODE, params->opCode), res); in SendResultToSelf()
158 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in FillAuthId()
235 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in FillNonce()
251 if (GetIntFromJson(in, FIELD_OPERATION_CODE, &(params->opCode)) != HC_SUCCESS) { in FillDasPakeParams()
253 params->opCode = AUTHENTICATE; in FillDasPakeParams()
255 if (params->opCode != OP_BIND && params->opCode != OP_UNBIND && in FillDasPakeParams()
256 params->opCode != AUTHENTICATE && params->opCode != AUTH_KEY_AGREEMENT) { in FillDasPakeParams()
257 LOGE("Unsupported opCode: %d.", params->opCode); in FillDasPakeParams()
271 if (params->opCode != AUTH_KEY_AGREEMENT) { in FillDasPakeParams()
[all …]
Dpake_message_util.c33 if (AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode) != HC_SUCCESS) { in PackagePakeRequestData()
37 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in PackagePakeRequestData()
72 if (params->opCode == AUTHENTICATE || params->opCode == AUTH_KEY_AGREEMENT) { in ParsePakeRequestMessage()
95 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in PackagePakeResponseData()
142 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in ParsePakeResponseMessage()
/base/security/device_auth/services/group_manager/src/session/bind_session/
Dbind_session_client.c27 ((session->opCode == MEMBER_DELETE) ? OP_UNBIND : OP_BIND)) != HC_SUCCESS) { in GenerateClientModuleParams()
121 … ProcessErrorCallback(requestId, realSession->opCode, result, NULL, realSession->base.callback); in OnBindChannelOpened()
130 … ProcessErrorCallback(requestId, realSession->opCode, result, NULL, realSession->base.callback); in OnBindChannelOpened()
148 int32_t opCode = MEMBER_INVITE; in CreateClientBindSession() local
149 if (GetIntFromJson(jsonParams, FIELD_OPERATION_CODE, &opCode) != HC_SUCCESS) { in CreateClientBindSession()
158 if (NeedCreateGroup(CLIENT, opCode)) { in CreateClientBindSession()
170 BindSession *session = CreateBaseBindSession(TYPE_CLIENT_BIND_SESSION, opCode, in CreateClientBindSession()
181 ProcessErrorCallback(session->reqId, session->opCode, result, NULL, session->base.callback); in CreateClientBindSession()
Dbind_session_server.c123 result = AddInfoToSendData((session->opCode == MEMBER_JOIN), session, *sendData); in PrepareData()
206 char *returnDataStr = ProcessRequestCallback(session->reqId, session->opCode, in RequestConfirmation()
372 int32_t result = CheckServerStatusIfNotInvite(osAccountId, session->opCode, jsonParams); in PrepareServer()
378 result = CombineInputData(session->opCode, returnData, jsonParams); in PrepareServer()
394 if (NeedCreateGroup(SERVER, session->opCode)) { in PrepareServer()
476 int32_t opCode = MEMBER_INVITE; in CreateServerBindSession() local
477 if (GetIntFromJson(jsonParams, FIELD_GROUP_OP, &opCode) != HC_SUCCESS) { in CreateServerBindSession()
482 BindSession *session = CreateBaseBindSession(TYPE_SERVER_BIND_SESSION, opCode, in CreateServerBindSession()
494 ProcessErrorCallback(session->reqId, session->opCode, result, NULL, session->base.callback); in CreateServerBindSession()
/base/security/device_auth/services/group_manager/src/
Dgroup_manager_common.c28 task->opCode = taskParams->opCode; in InitGroupManagerTask()
80 int32_t InitAndPushGMTask(int32_t osAccountId, int32_t opCode, int64_t reqId, CJson *params, TaskFu… in InitAndPushGMTask() argument
89 taskParams.opCode = opCode; in InitAndPushGMTask()
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/
Dpake_v1_client_protocol_task.c66 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in PakeRequest()
74 …if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND || params->opCode == AUTH_KEY_AG… in PakeRequest()
101 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in ParseMsgForClientConfirm()
156 if (params->isPskSupported && (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND)) { in PakeClientConfirm()
241 res = ClientProtocolMessageOut(out, params->opCode, step); in Process()
Dpake_v1_server_protocol_task.c65 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in PackageMsgForResponse()
91 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in PakeResponse()
99 if (params->isPskSupported && (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND)) { in PakeResponse()
206 res = ServerProtocolMessageOut(out, params->opCode, step); in Process()
/base/security/access_token/services/privacymanager/src/database/
Ddata_translator.cpp52 int32_t opCode; in TranslationIntoGenericValues() local
53 if (Constant::TransferPermissionToOpcode(perm, opCode)) { in TranslationIntoGenericValues()
54 orGenericValues.Put(PrivacyFiledConst::FIELD_OP_CODE, opCode); in TranslationIntoGenericValues()
66 int32_t opCode = inGenericValues.GetInt(PrivacyFiledConst::FIELD_OP_CODE); in TranslationGenericValuesIntoPermissionUsedRecord() local
67 if (!Constant::TransferOpcodeToPermission(opCode, permission)) { in TranslationGenericValuesIntoPermissionUsedRecord()
/base/security/device_auth/services/group_manager/inc/
Dbase_group_manager_task.h27 int32_t opCode; member
41 int32_t opCode; member
/base/security/device_auth/services/authenticators/inc/account_unrelated/
Ddas_version_util.h43 int32_t opCode; member
56 ProtocolType GetPrototolType(VersionStruct *curVersion, OperationCode opCode);
Ddas_task_common.h35 int ClientProtocolMessageOut(CJson *out, int opCode, uint32_t step);
36 int ServerProtocolMessageOut(CJson *out, int opCode, uint32_t step);
/base/security/access_token/services/privacymanager/src/common/
Dconstant.cpp62 bool Constant::TransferPermissionToOpcode(const std::string& permissionName, int32_t& opCode) in TransferPermissionToOpcode() argument
67 opCode = PERMISSION_OPCODE_MAP.at(permissionName); in TransferPermissionToOpcode()
71 bool Constant::TransferOpcodeToPermission(int32_t opCode, std::string& permissionName) in TransferOpcodeToPermission() argument
74 [opCode](const std::map<std::string, int32_t>::value_type item) { in TransferOpcodeToPermission()
75 return item.second == opCode; in TransferOpcodeToPermission()
/base/security/access_token/services/privacymanager/include/common/
Dconstant.h78 static bool TransferPermissionToOpcode(const std::string& permissionName, int32_t& opCode);
79 static bool TransferOpcodeToPermission(int32_t opCode, std::string& permissionName);
/base/security/access_token/services/privacymanager/test/unittest/
Dpermission_record_manager_test.cpp92 .opCode = Constant::OP_CAMERA,
101 .opCode = Constant::OP_MICROPHONE,
110 .opCode = Constant::OP_CAMERA,
119 .opCode = Constant::OP_MICROPHONE,
307 .opCode = Constant::OP_CAMERA,
321 …PermissionRecordManager::GetInstance().GetRecordFromStartList(record1.tokenId, record1.opCode, rec…
342 .opCode = Constant::OP_MICROPHONE,
354 …PermissionRecordManager::GetInstance().GetRecordFromStartList(record1.tokenId, record1.opCode, rec…
375 .opCode = Constant::OP_CAMERA,
386 …PermissionRecordManager::GetInstance().GetRecordFromStartList(record1.tokenId, record1.opCode, rec…
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/pake_v1_task/
Dpake_v1_server_task.c83 switch (realTask->params.opCode) { in CreateNextTask()
102 LOGE("Unsupported opCode: %d.", realTask->params.opCode); in CreateNextTask()
106 … LOGE("Create and process next task failed, opcode: %d, res: %d.", realTask->params.opCode, res); in CreateNextTask()
117 LOGI("End server task successfully, opcode: %d.", realTask->params.opCode); in CreateNextTask()
Dpake_v1_client_task.c83 switch (realTask->params.opCode) { in CreateNextTask()
102 LOGE("Unsupported opCode: %d.", realTask->params.opCode); in CreateNextTask()
106 … LOGE("Create and process next task failed, opcode: %d, res: %d.", realTask->params.opCode, res); in CreateNextTask()
117 LOGI("End client task successfully, opcode: %d.", realTask->params.opCode); in CreateNextTask()
/base/security/access_token/services/privacymanager/src/record/
Dpermission_record.cpp25 values.Put(PrivacyFiledConst::FIELD_OP_CODE, record.opCode); in TranslationIntoGenericValues()
36 record.opCode = values.GetInt(PrivacyFiledConst::FIELD_OP_CODE); in TranslationIntoPermissionRecord()
Dpermission_record_manager.cpp81 record.tokenId, record.opCode, record.status, record.timestamp); in AddRecord()
93 int32_t opCode; in GetPermissionRecord() local
94 if (!Constant::TransferPermissionToOpcode(permissionName, opCode)) { in GetPermissionRecord()
106 record.opCode = opCode; in GetPermissionRecord()
338 …[record](const auto& rec) { return (rec.opCode == record.opCode) && (rec.tokenId == record.tokenId… in HasStarted()
341 record.tokenId, record.opCode); in HasStarted()
354 Constant::TransferOpcodeToPermission(it->opCode, perm); in FindRecordsToUpdateAndExecuted()
408 bool PermissionRecordManager::GetRecordFromStartList(uint32_t tokenId, int32_t opCode, PermissionR… in GetRecordFromStartList() argument
412 if ((it->opCode == opCode) && (it->tokenId == tokenId)) { in GetRecordFromStartList()
476 if ((it->opCode) != Constant::OP_MICROPHONE) { in NotifyMicChange()
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/
Diso_task_common.c112 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), ret); in GenerateEncResult()
192 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_OPERATION_CODE, params->opCode), res); in GenEncResult()
316 if (params->opCode == OP_BIND) { in FillAuthId()
381 if (params->opCode == OP_BIND) { in FillPin()
435 if (params->opCode == OP_UNBIND || params->opCode == OP_BIND) { in GetKeyLength()
454 if (GetIntFromJson(in, FIELD_OPERATION_CODE, &(params->opCode)) != 0) { in InitIsoParams()
456 params->opCode = AUTHENTICATE; in InitIsoParams()
458 … if (params->opCode != OP_BIND && params->opCode != OP_UNBIND && params->opCode != AUTHENTICATE) { in InitIsoParams()
459 LOGE("Unsupported opCode: %d.", params->opCode); in InitIsoParams()
560 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in GeneratePsk()
/base/security/device_auth/services/authenticators/inc/account_related/
Daccount_module.h29 int32_t ProcessAccountCredentials(int32_t osAccountId, int32_t opCode, CJson *in, CJson *out);
/base/security/device_auth/services/authenticators/src/account_unrelated/
Ddas_version_util.c155 ProtocolType GetPrototolType(VersionStruct *curVersion, OperationCode opCode) in GetPrototolType() argument
157 switch (opCode) { in GetPrototolType()
165 LOGE("Unsupported opCode: %d.", opCode); in GetPrototolType()
/base/security/device_auth/services/group_manager/inc/session/
Dbind_session_common_defines.h29 int32_t opCode; member
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/iso_protocol_task/
Diso_client_protocol_task.c64 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), res); in IsoClientStartPackData()
67 if (params->opCode == AUTHENTICATE || params->opCode == OP_UNBIND) { in IsoClientStartPackData()
140 if (params->opCode == OP_BIND) { in ParseServerStartMessage()
269 res = ClientProtocolMessageOut(out, params->opCode, step); in Process()
/base/security/access_token/services/privacymanager/include/record/
Dpermission_record.h26 int32_t opCode = 0; member

12