/base/security/device_auth/common_lib/interfaces/ |
D | json_utils.h | 29 typedef cJSON CJson; typedef 32 CJson *CreateJsonFromString(const char *jsonStr); 34 CJson *CreateJson(void); 36 CJson *CreateJsonArray(void); 38 CJson *DuplicateJson(const CJson *jsonObj); 39 void FreeJson(CJson *jsonObj); 41 void DeleteItemFromJson(CJson *jsonObj, const char *key); 42 void DeleteAllItemExceptOne(CJson *jsonObj, const char *key); 43 void DeleteAllItem(CJson *jsonObj); 44 CJson *DetachItemFromJson(CJson *jsonObj, const char *key); [all …]
|
/base/security/device_auth/services/session_manager/inc/session/v2/ |
D | dev_session_util.h | 27 int32_t FillPeerAuthIdIfNeeded(bool isClient, const CJson *context, CJson *inputData); 28 int32_t SetPeerAuthIdToContextIfNeeded(CJson *context, const IdentityInfo *info); 30 int32_t SetPeerInfoToContext(CJson *context, const CJson *inputData); 31 int32_t ReplaceAuthIdWithRandom(CJson *authData); 32 int32_t CheckPeerPkInfoForPdid(const CJson *context, const CJson *inputData); 33 int32_t GetRealPkInfoStr(int32_t osAccountId, const CJson *credInfo, char **returnPkInfoStr, bool *… 34 int32_t AddPkInfoWithPdid(const CJson *context, CJson *credInfo, const char *realPkInfoStr);
|
/base/security/device_auth/services/session_manager/inc/session/v1/compatible_auth_sub_session/ |
D | compatible_auth_sub_session_common.h | 30 int32_t GetAuthParamsVec(int32_t osAccountId, const CJson *param, ParamsVecForAuth *authParamsVec); 31 int32_t CreateAndProcessAuthTask(CompatibleAuthSubSession *session, CJson *paramInSession, CJson *o… 33 void ClearCachedData(CJson *paramInSession); 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); 38 void NotifyPeerAuthError(const CJson *authParam, const DeviceAuthCallback *callback);
|
D | compatible_auth_sub_session.h | 25 int32_t CreateClientAuthSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSub… 26 int32_t CreateServerAuthSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSub… 27 int32_t ProcessClientAuthSubSession(CompatibleBaseSubSession *session, CJson *in, CJson **out, int3… 28 int32_t ProcessServerAuthSubSession(CompatibleBaseSubSession *session, CJson *in, int32_t *status);
|
/base/security/device_auth/services/group_manager/inc/ |
D | group_operation_common.h | 29 int32_t GenerateReturnGroupInfo(const TrustedGroupEntry *groupEntry, CJson *returnJson); 30 int32_t GenerateReturnDevInfo(const TrustedDeviceEntry *deviceEntry, CJson *returnJson); 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); [all …]
|
/base/security/device_auth/services/authenticators/inc/account_unrelated/ |
D | das_task_common.h | 30 int32_t GetIdPeer(const CJson *in, const char *peerIdKey, const Uint8Buff *authIdSelf, Uint8Buff *a… 31 int32_t GetAndCheckAuthIdPeer(const CJson *in, const Uint8Buff *authIdSelf, const Uint8Buff *authId… 32 int32_t GetAuthIdPeerFromPayload(const CJson *in, const Uint8Buff *authIdSelf, Uint8Buff *authIdPee… 33 int32_t GetAndCheckKeyLenOnServer(const CJson *in, uint32_t *keyLen); 35 void DasSendErrMsgToSelf(CJson *out, int errCode); 36 void DasSendErrorToOut(CJson *out, int errCode); // send error to self and peer 38 uint32_t ProtocolMessageIn(const CJson *in); 39 int ClientProtocolMessageOut(CJson *out, int opCode, uint32_t step); 40 int ServerProtocolMessageOut(CJson *out, int opCode, uint32_t step);
|
/base/security/device_auth/services/authenticators/inc/account_unrelated/pake_task/ |
D | pake_message_util.h | 26 int32_t PackagePakeRequestData(const PakeParams *params, CJson *payload); 27 int32_t ParsePakeRequestMessage(PakeParams *params, const CJson *in); 28 int32_t PackagePakeResponseData(const PakeParams *params, CJson *payload); 29 int32_t ParsePakeResponseMessage(PakeParams *params, const CJson *in); 30 int32_t PackagePakeClientConfirmData(const PakeParams *params, CJson *payload); 31 int32_t ParsePakeClientConfirmMessage(PakeParams *params, const CJson *in); 32 int32_t PackagePakeServerConfirmData(const PakeParams *params, CJson *payload); 33 int32_t ParsePakeServerConfirmMessage(PakeParams *params, const CJson *in);
|
/base/security/device_auth/services/frameworks/inc/module/ |
D | dev_auth_module_manager.h | 30 bool (*isMsgNeedIgnore)(const CJson *in); 31 int (*createTask)(int32_t *, const CJson *in, CJson *out); 32 int (*processTask)(int32_t, const CJson *in, CJson *out, int32_t *status); 49 int32_t CreateTask(int32_t *taskId, const CJson *in, CJson *out, int moduleType); 50 int32_t ProcessTask(int taskId, const CJson *in, CJson *out, int32_t *status, int moduleType); 52 int32_t CheckMsgRepeatability(const CJson *in, int moduleType);
|
/base/security/device_auth/services/frameworks/inc/plugin_adapter/ |
D | account_auth_plugin_proxy.h | 27 int32_t SetAccountAuthPlugin(const CJson *inputParams, AccountAuthExtPlug *accountAuthPlugin); 28 int32_t ExcuteCredMgrCmd(int32_t osAccountId, int32_t cmdId, const CJson *in, CJson *out); 29 int32_t CreateAuthSession(int32_t *sessionId, const CJson *in, CJson *out); 30 int32_t ProcessAuthSession(int32_t *sessionId, const CJson *in, CJson *out, int32_t *status);
|
/base/security/device_auth/services/frameworks/src/plugin_adapter_mock/ |
D | account_auth_plugin_proxy_mock.c | 20 int32_t SetAccountAuthPlugin(const CJson *inputParams, AccountAuthExtPlug *accountAuthPlugin) in SetAccountAuthPlugin() 27 int32_t ExcuteCredMgrCmd(int32_t osAccountId, int32_t cmdId, const CJson *in, CJson *out) in ExcuteCredMgrCmd() 36 int32_t CreateAuthSession(int32_t *sessionId, const CJson *in, CJson *out) in CreateAuthSession() 44 int32_t ProcessAuthSession(int32_t *sessionId, const CJson *in, CJson *out, int32_t *status) in ProcessAuthSession()
|
/base/security/device_auth/common_lib/impl/src/ |
D | json_utils.c | 26 CJson *CreateJsonFromString(const char *jsonStr) in CreateJsonFromString() 34 CJson *CreateJson(void) in CreateJson() 39 CJson *CreateJsonArray(void) in CreateJsonArray() 44 CJson *DuplicateJson(const CJson *jsonObj) in DuplicateJson() 52 void FreeJson(CJson *jsonObj) in FreeJson() 57 void DeleteItemFromJson(CJson *jsonObj, const char *key) in DeleteItemFromJson() 65 void DeleteAllItemExceptOne(CJson *jsonObj, const char *key) in DeleteAllItemExceptOne() 71 CJson *curItem = jsonObj->child; in DeleteAllItemExceptOne() 72 CJson *nextItem = NULL; in DeleteAllItemExceptOne() 82 void DeleteAllItem(CJson *jsonObj) in DeleteAllItem() [all …]
|
/base/security/device_auth/services/group_auth/src/group_auth_manager/account_unrelated_group_auth/ |
D | account_unrelated_group_auth.c | 26 static void OnDasFinish(int64_t requestId, const CJson *authParam, const CJson *out, 29 const TrustedDeviceEntry *localAuthInfo, CJson *paramsData); 30 static int32_t GetAuthParamsVecForServer(const CJson *dataFromClient, ParamsVecForAuth *authParamsV… 31 static int32_t CombineDasServerConfirmParams(const CJson *confirmationJson, CJson *dataFromClient); 41 static int32_t ReturnSessionKey(int64_t requestId, const CJson *authParam, in ReturnSessionKey() 42 const CJson *out, const DeviceAuthCallback *callback) in ReturnSessionKey() 74 static int32_t AddGroupIdToSelfData(const CJson *authParam, CJson *returnToSelf) in AddGroupIdToSelfData() 88 static int32_t AddPeerUdidToSelfData(const CJson *authParam, CJson *returnToSelf) in AddPeerUdidToSelfData() 102 static int32_t AddPeerAuthIdToSelfData(const CJson *authParam, CJson *returnToSelf) in AddPeerAuthIdToSelfData() 117 static int32_t AddSelfTypeToSelfData(const CJson *authParam, CJson *returnToSelf) in AddSelfTypeToSelfData() [all …]
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/ |
D | compatible_bind_sub_session_util.c | 24 static int32_t AddPinCode(const CJson *returnData, CJson *jsonParams) in AddPinCode() 38 static int32_t AddAuthIdIfExist(const CJson *returnData, CJson *jsonParams) in AddAuthIdIfExist() 48 static int32_t AddUserTypeIfExistAndValid(const CJson *returnData, CJson *jsonParams) in AddUserTypeIfExistAndValid() 64 static int32_t AddGroupVisibilityIfExistAndValid(const CJson *returnData, CJson *jsonParams) in AddGroupVisibilityIfExistAndValid() 80 static int32_t AddExpireTimeIfExistAndValid(const CJson *returnData, CJson *jsonParams) in AddExpireTimeIfExistAndValid() 96 static int32_t CombineInfoWhenInvite(const CJson *returnData, CJson *jsonParams) in CombineInfoWhenInvite() 110 CJson *errorData) in AddGroupErrorInfo() 127 …nerateGroupErrorMsg(int32_t errorCode, int64_t requestId, const CJson *jsonParams, CJson **errorDa… in GenerateGroupErrorMsg() 160 int32_t CreateAndProcessBindTask(CompatibleBindSubSession *session, const CJson *in, CJson *out, in… in CreateAndProcessBindTask() 181 int32_t TransmitBindSessionData(const CompatibleBindSubSession *session, const CJson *sendData) in TransmitBindSessionData() [all …]
|
D | compatible_bind_sub_session_common.c | 22 static int32_t AddPinCode(const CJson *jsonParams, CompatibleBindSubSession *session) in AddPinCode() 36 static int32_t AddGroupId(const char *groupId, CJson *params) in AddGroupId() 45 static int32_t AddGroupName(const CJson *jsonParams, CJson *params) in AddGroupName() 59 static int32_t AddGroupOwnerIfExist(const CJson *jsonParams, CJson *params) in AddGroupOwnerIfExist() 69 static int32_t AddGroupTypeIfValid(const CJson *jsonParams, CJson *params) in AddGroupTypeIfValid() 87 static int32_t AddGroupVisibilityIfValidOrDefault(const CJson *jsonParams, CJson *params) in AddGroupVisibilityIfValidOrDefault() 102 static int32_t AddExpireTimeIfValidOrDefault(const CJson *jsonParams, CJson *params) in AddExpireTimeIfValidOrDefault() 117 static int32_t AddGroupInfoToSessionParams(const char *groupId, const CJson *jsonParams, CJson *par… in AddGroupInfoToSessionParams() 163 …uthIdAndUserTypeIfValidOrDefault(int32_t osAccountId, const char *groupId, const CJson *jsonParams, in AddAuthIdAndUserTypeIfValidOrDefault() 164 CJson *params) in AddAuthIdAndUserTypeIfValidOrDefault() [all …]
|
/base/security/device_auth/services/group_auth/inc/ |
D | base_group_auth.h | 32 …void (*onFinish)(int64_t requestId, const CJson *authParam, const CJson *out, const DeviceAuthCall… 34 const TrustedDeviceEntry *localAuthInfo, CJson *paramsData); 35 …int32_t (*getAuthParamsVecForServer)(const CJson *dataFromClient, ParamsVecForAuth *authParamsVec); 36 int32_t (*combineServerConfirmParams)(const CJson *confirmationJson, CJson *dataFromClient);
|
/base/security/device_auth/services/session_manager/inc/session/v1/compatible_bind_sub_session/ |
D | compatible_bind_sub_session_util.h | 25 int32_t CreateAndProcessBindTask(CompatibleBindSubSession *session, const CJson *in, CJson *out, in… 26 int32_t TransmitBindSessionData(const CompatibleBindSubSession *session, const CJson *sendData); 27 int32_t CombineConfirmData(int operationCode, const CJson *returnData, CJson *jsonParams); 29 void InformPeerProcessError(int64_t requestId, const CJson *jsonParams, const DeviceAuthCallback *c…
|
D | compatible_bind_sub_session.h | 25 int32_t CreateClientBindSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSub… 26 int32_t CreateServerBindSubSession(CJson *in, const DeviceAuthCallback *callback, CompatibleBaseSub… 27 int32_t ProcessClientBindSubSession(CompatibleBaseSubSession *session, CJson *in, CJson **out, int3… 28 int32_t ProcessServerBindSubSession(CompatibleBaseSubSession *session, CJson *in, int32_t *status);
|
/base/security/device_auth/test/unittest/deviceauth/source/ |
D | json_utils_mock.c | 71 CJson *CreateJsonFromString(const char *jsonStr) in CreateJsonFromString() 82 CJson *CreateJson(void) in CreateJson() 90 CJson *CreateJsonArray(void) in CreateJsonArray() 98 CJson *DuplicateJson(const CJson *jsonObj) in DuplicateJson() 109 void FreeJson(CJson *jsonObj) in FreeJson() 114 void DeleteItemFromJson(CJson *jsonObj, const char *key) in DeleteItemFromJson() 122 void DeleteAllItemExceptOne(CJson *jsonObj, const char *key) in DeleteAllItemExceptOne() 128 CJson *curItem = jsonObj->child; in DeleteAllItemExceptOne() 129 CJson *nextItem = NULL; in DeleteAllItemExceptOne() 139 void DeleteAllItem(CJson *jsonObj) in DeleteAllItem() [all …]
|
/base/security/device_auth/services/authenticators/inc/account_related/ |
D | account_task_main.h | 25 int32_t (*process)(struct TaskBaseT *, const CJson *in, CJson *out, int32_t *status); 32 int32_t (*processTask)(struct AccountTaskT *, const CJson *in, CJson *out, int32_t *status); 41 AccountTask *CreateAccountTaskT(int32_t *taskId, const CJson *in, CJson *out);
|
/base/security/device_auth/services/creds_manager/inc/ |
D | creds_manager.h | 26 int32_t AddCertInfoToJson(const CertInfo *certInfo, CJson *out); 27 int32_t GetCredInfosByPeerIdentity(const CJson *in, IdentityInfoVec *vec); 28 int32_t GetCredInfoByPeerUrl(const CJson *in, const Uint8Buff *presharedUrl, IdentityInfo **returnI… 29 int32_t GetSharedSecretByUrl(const CJson *in, const Uint8Buff *presharedUrl, ProtocolAlgType protoc… 31 int32_t GetCredInfoByPeerCert(const CJson *in, const CertInfo *certInfo, IdentityInfo **returnInfo); 32 int32_t GetSharedSecretByPeerCert(const CJson *in, const CertInfo *peerCertInfo, ProtocolAlgType pr…
|
/base/security/device_auth/services/session_manager/src/session/v1/compatible_auth_sub_session/ |
D | compatible_auth_sub_session.c | 25 static int32_t CheckInputAuthParams(const CJson *authParam) in CheckInputAuthParams() 40 static int32_t CreateClientAuthSubSessionInner(int32_t osAccountId, CJson *jsonParams, in CreateClientAuthSubSessionInner() 73 static int32_t GetAuthInfoForServer(CJson *dataFromClient, ParamsVecForAuth *authParamsVec) in GetAuthInfoForServer() 89 static bool IsPeerGroupAuthError(const CJson *in) in IsPeerGroupAuthError() 98 static int32_t CheckPeerGroupAuthMsg(CompatibleAuthSubSession *session, CJson *receivedData) in CheckPeerGroupAuthMsg() 110 …nt32_t ProcessClientAuthTaskInner(CompatibleAuthSubSession *session, int32_t moduleType, CJson *in, in ProcessClientAuthTaskInner() 111 CJson *out, int32_t *status) in ProcessClientAuthTaskInner() 113 … CJson *paramInSession = (session->paramsList).get(&(session->paramsList), session->currentIndex); in ProcessClientAuthTaskInner() 130 static void ProcessDeviceLevel(const CJson *receiveData, CJson *authParam) in ProcessDeviceLevel() 141 static int32_t ProcessClientAuthTask(CompatibleAuthSubSession *session, CJson *receivedData, int32_… in ProcessClientAuthTask() [all …]
|
D | compatible_auth_sub_session_common.c | 30 static void GetAccountRelatedCandidateGroups(int32_t osAccountId, const CJson *param, bool isDevice… in GetAccountRelatedCandidateGroups() 65 static void GetCandidateGroups(int32_t osAccountId, const CJson *param, GroupEntryVec *vec) in GetCandidateGroups() 92 CJson *paramsData) in AddGeneralParams() 119 const TrustedGroupEntry *groupInfo, CJson *paramsData) in ExtractAndAddParams() 152 static int32_t FillAuthParams(int32_t osAccountId, const CJson *param, in FillAuthParams() 179 CJson *paramsData = DuplicateJson(param); in FillAuthParams() 196 const CJson *param, ParamsVecForAuth *authParamsVec) in GetCandidateAuthInfo() 216 static int32_t AddInfoToErrorData(CJson *sendToPeer, const CJson *authParam) in AddInfoToErrorData() 234 static int32_t AddVersionMsgToError(CJson *errorToPeer) in AddVersionMsgToError() 236 CJson *version = CreateJson(); in AddVersionMsgToError() [all …]
|
/base/security/device_auth/test/unittest/deviceauth/unit_test/source/ |
D | pake_v2_auth_task_test.cpp | 44 CJson *in = nullptr; 45 CJson *out = nullptr; 53 CJson *in = CreateJson(); 54 CJson *out = nullptr; 63 CJson *in = CreateJson(); 64 CJson *out = CreateJson(); 74 CJson *in = CreateJson(); 75 CJson *out = CreateJson(); 103 CJson *in = nullptr; 104 CJson *out = nullptr; [all …]
|
/base/security/device_auth/services/authenticators/inc/account_unrelated/iso_task/ |
D | iso_task_common.h | 27 int InitIsoParams(IsoParams *params, const CJson *in); 32 int GeneratePsk(const CJson *in, IsoParams *params); 34 int GenerateEncResult(const IsoParams *params, int message, CJson *sendToPeer, const char *aad); 35 int GenEncResult(IsoParams *params, int message, CJson *out, const char *aad, bool isNeedReturnKey); 36 int SendResultToFinalSelf(IsoParams *params, CJson *out, bool isNeedReturnKey); 37 int CheckEncResult(IsoParams *params, const CJson *in, const char *aad);
|
/base/security/device_auth/services/authenticators/inc/account_related/auth/pake_v2_auth_task/ |
D | pake_v2_auth_task_common.h | 52 TaskBase *CreatePakeV2AuthTask(const CJson *in, CJson *out, const AccountVersionInfo *verInfo); 58 int32_t GetPkInfoPeer(PakeAuthParams *params, const CJson *in); 60 int32_t InitPakeAuthParams(const CJson *in, PakeAuthParams *params, const AccountVersionInfo *verIn… 64 int32_t ExtractPakePeerId(PakeAuthParams *params, const CJson *in); 68 int32_t ExtractPeerDeviceId(PakeAuthParams *params, const CJson *in); 70 int32_t ExtractPeerDevId(PakeAuthParams *params, const CJson *in);
|