Home
last modified time | relevance | path

Searched refs:sendToSelf (Results 1 – 11 of 11) sorted by relevance

/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/
H A Daccount_task_main.c29 CJson *sendToSelf = CreateJson(); in AccountSendErrMsgToSelf() local
30 if (sendToSelf == NULL) { in AccountSendErrMsgToSelf()
34 if (AddIntToJson(sendToSelf, FIELD_ERROR_CODE, errCode) != CLIB_SUCCESS) { in AccountSendErrMsgToSelf()
36 FreeJson(sendToSelf); in AccountSendErrMsgToSelf()
39 if (AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf) != CLIB_SUCCESS) { in AccountSendErrMsgToSelf()
41 FreeJson(sendToSelf); in AccountSendErrMsgToSelf()
44 FreeJson(sendToSelf); in AccountSendErrMsgToSelf()
49 CJson *sendToSelf = CreateJson(); in AccountSendErrMsgToOut() local
50 if (sendToSelf == NULL) { in AccountSendErrMsgToOut()
57 FreeJson(sendToSelf); in AccountSendErrMsgToOut()
[all …]
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/pake_v2_auth_task/
H A Dpake_v2_auth_server_task.c166 CJson *sendToSelf = CreateJson(); in SendFinalToOut() local
167 if (sendToSelf == NULL) { in SendFinalToOut()
174 FreeJson(sendToSelf); in SendFinalToOut()
181 FreeJson(sendToSelf); in SendFinalToOut()
184 GOTO_IF_ERR(AddStringToJson(sendToSelf, FIELD_USER_ID, (const char *)task->params.userIdPeer)); in SendFinalToOut()
185 GOTO_IF_ERR(AddByteToJson(sendToSelf, FIELD_SESSION_KEY, in SendFinalToOut()
188 … GOTO_IF_ERR(AddStringToJson(sendToSelf, FIELD_DEV_ID, (const char *)task->params.devIdPeer.val)); in SendFinalToOut()
189 GOTO_IF_ERR(AddIntToJson(sendToSelf, FIELD_CREDENTIAL_TYPE, ASYMMETRIC_CRED)); in SendFinalToOut()
196 GOTO_IF_ERR(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf)); in SendFinalToOut()
200 FreeJson(sendToSelf); in SendFinalToOut()
[all …]
H A Dpake_v2_auth_client_task.c188 CJson *sendToSelf = CreateJson(); in SendFinalToOut() local
189 if (sendToSelf == NULL) { in SendFinalToOut()
193 GOTO_IF_ERR(AddStringToJson(sendToSelf, FIELD_USER_ID, (const char *)task->params.userIdPeer)); in SendFinalToOut()
194 GOTO_IF_ERR(AddByteToJson(sendToSelf, in SendFinalToOut()
196 …GOTO_IF_ERR(AddStringToJson(sendToSelf, FIELD_DEVICE_ID, (const char *)task->params.deviceIdSelf.v… in SendFinalToOut()
197 … GOTO_IF_ERR(AddStringToJson(sendToSelf, FIELD_DEV_ID, (const char *)task->params.devIdPeer.val)); in SendFinalToOut()
198 GOTO_IF_ERR(AddIntToJson(sendToSelf, FIELD_CREDENTIAL_TYPE, ASYMMETRIC_CRED)); in SendFinalToOut()
200 GOTO_IF_ERR(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf)); in SendFinalToOut()
201 FreeJson(sendToSelf); in SendFinalToOut()
206 FreeJson(sendToSelf); in SendFinalToOut()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/
H A Ddas_task_common.c45 CJson *sendToSelf = CreateJson(); in DasSendErrorToOut() local
46 if (sendToSelf == NULL) { in DasSendErrorToOut()
53 FreeJson(sendToSelf); in DasSendErrorToOut()
73 FreeJson(sendToSelf); in DasSendErrorToOut()
79 CJson *sendToSelf = CreateJson(); in DasSendErrMsgToSelf() local
80 if (sendToSelf == NULL) { in DasSendErrMsgToSelf()
86 FreeJson(sendToSelf); in DasSendErrMsgToSelf()
91 FreeJson(sendToSelf); in DasSendErrMsgToSelf()
95 if (AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf) != 0) { in DasSendErrMsgToSelf()
96 FreeJson(sendToSelf); in DasSendErrMsgToSelf()
[all …]
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/
H A Dpake_task_common.c86 CJson *sendToSelf = CreateJson(); in SendResultToSelf() local
87 if (sendToSelf == NULL) { in SendResultToSelf()
92 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_OPERATION_CODE, params->opCode), res); in SendResultToSelf()
93 … GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_AUTH_FORM, AUTH_FORM_ACCOUNT_UNRELATED), res); in SendResultToSelf()
101 GOTO_ERR_AND_SET_RET(AddByteToJson(sendToSelf, FIELD_SESSION_KEY, params->returnKey.val, in SendResultToSelf()
105 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf), res); in SendResultToSelf()
108 ClearSensitiveStringInJson(sendToSelf, FIELD_SESSION_KEY); in SendResultToSelf()
109 FreeJson(sendToSelf); in SendResultToSelf()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/iso_auth_task/
H A Diso_auth_task_common.c391 CJson *sendToSelf = CreateJson(); in AuthIsoSendFinalToOut() local
392 if (sendToSelf == NULL) { in AuthIsoSendFinalToOut()
396 if (AddByteToJson(sendToSelf, FIELD_SESSION_KEY, in AuthIsoSendFinalToOut()
401 if (AddStringToJson(sendToSelf, FIELD_USER_ID, params->userIdPeer) != CLIB_SUCCESS) { in AuthIsoSendFinalToOut()
405 if (AddStringToJson(sendToSelf, FIELD_DEVICE_ID, params->deviceIdPeer) != CLIB_SUCCESS) { in AuthIsoSendFinalToOut()
409 if (AddIntToJson(sendToSelf, FIELD_CREDENTIAL_TYPE, params->credentialType) != CLIB_SUCCESS) { in AuthIsoSendFinalToOut()
413 if (AddStringToJson(sendToSelf, FIELD_DEV_ID, (char *)params->devIdPeer.val) != CLIB_SUCCESS) { in AuthIsoSendFinalToOut()
417 if (AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf) != CLIB_SUCCESS) { in AuthIsoSendFinalToOut()
421 FreeJson(sendToSelf); in AuthIsoSendFinalToOut()
425 FreeJson(sendToSelf); in AuthIsoSendFinalToOut()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_task_common/
H A Diso_task_common.c137 CJson *sendToSelf = CreateJson(); in SendResultToFinalSelf() local
138 if (sendToSelf == NULL) { in SendResultToFinalSelf()
160 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf), res); in SendResultToFinalSelf()
162 ClearSensitiveStringInJson(sendToSelf, FIELD_SESSION_KEY); in SendResultToFinalSelf()
163 FreeJson(sendToSelf); in SendResultToFinalSelf()
173 CJson *sendToSelf = CreateJson(); in GenEncResult() local
174 if (sendToSelf == NULL) { in GenEncResult()
181 FreeJson(sendToSelf); in GenEncResult()
207 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf), res); in GenEncResult()
209 ClearSensitiveStringInJson(sendToSelf, FIELD_SESSION_KEY); in GenEncResult()
[all …]
/ohos5.0/base/security/device_auth/test/fuzztest/group_auth/account_related/accountrelatedgroupauth_fuzzer/
H A Daccountrelatedgroupauth_fuzzer.cpp239 CJson *sendToSelf = CreateJson(); in AccountRelatedGroupAuthTest0023() local
241 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf); in AccountRelatedGroupAuthTest0023()
244 (void)AddIntToJson(sendToSelf, FIELD_CREDENTIAL_TYPE, NUM_TWO); in AccountRelatedGroupAuthTest0023()
245 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf); in AccountRelatedGroupAuthTest0023()
248 (void)AddStringToJson(sendToSelf, FIELD_DEV_ID, "DEV_ID"); // For unit test. in AccountRelatedGroupAuthTest0023()
249 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf); in AccountRelatedGroupAuthTest0023()
252 (void)AddStringToJson(sendToSelf, FIELD_USER_ID, "USER_ID"); // For unit test. in AccountRelatedGroupAuthTest0023()
253 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf); in AccountRelatedGroupAuthTest0023()
256 FreeJson(sendToSelf); in AccountRelatedGroupAuthTest0023()
/ohos5.0/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_related_group_auth/
H A Daccount_related_group_auth.c121 static int32_t GetUserIdForAccount(const CJson *sendToSelf, CJson *returnToSelf) in GetUserIdForAccount() argument
123 const char *peerUserId = GetStringFromJson(sendToSelf, FIELD_USER_ID); in GetUserIdForAccount()
724 const CJson *sendToSelf = GetObjFromJson(out, FIELD_SEND_TO_SELF); in PrepareTrustedDeviceInfo() local
725 if (sendToSelf == NULL) { in PrepareTrustedDeviceInfo()
735 const char *peerAuthId = GetStringFromJson(sendToSelf, FIELD_DEV_ID); in PrepareTrustedDeviceInfo()
740 const char *peerUserId = GetStringFromJson(sendToSelf, FIELD_USER_ID); in PrepareTrustedDeviceInfo()
802 int32_t res = GetSessionKeyForAccount(sendToSelf, returnToSelf); in PrepareAccountDataToSelf()
807 res = GetUserIdForAccount(sendToSelf, returnToSelf); in PrepareAccountDataToSelf()
839 const CJson *sendToSelf = GetObjFromJson(out, FIELD_SEND_TO_SELF); in AccountOnFinishToSelf() local
840 if (sendToSelf == NULL) { in AccountOnFinishToSelf()
[all …]
/ohos5.0/base/security/device_auth/test/unittest/deviceauth/unit_test/source/
H A Daccount_related_group_auth_dir_test.cpp255 CJson *sendToSelf = CreateJson(); variable
257 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf);
260 (void)AddIntToJson(sendToSelf, FIELD_CREDENTIAL_TYPE, 2);
261 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf);
264 (void)AddStringToJson(sendToSelf, FIELD_DEV_ID, "DEV_ID"); // For unit test.
265 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf);
268 (void)AddStringToJson(sendToSelf, FIELD_USER_ID, "USER_ID"); // For unit test.
269 (void)AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf);
272 FreeJson(sendToSelf);
/ohos5.0/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_unrelated_group_auth/
H A Daccount_unrelated_group_auth.c153 static int32_t AddSessionKeyToSelfData(const CJson *authParam, const CJson *sendToSelf, CJson *retu… in AddSessionKeyToSelfData() argument
164 if (GetByteFromJson(sendToSelf, FIELD_SESSION_KEY, sessionKey, keyLen) != HC_SUCCESS) { in AddSessionKeyToSelfData()
181 static int32_t PrepareDasReturnToSelfData(const CJson *authParam, const CJson *sendToSelf, CJson *r… in PrepareDasReturnToSelfData() argument
203 res = AddSessionKeyToSelfData(authParam, sendToSelf, returnToSelf); in PrepareDasReturnToSelfData()
265 const CJson *sendToSelf = GetObjFromJson(out, FIELD_SEND_TO_SELF); in DasOnFinishToSelf() local
266 if (sendToSelf == NULL) { in DasOnFinishToSelf()
275 int32_t res = PrepareDasReturnToSelfData(authParam, sendToSelf, returnToSelf); in DasOnFinishToSelf()