/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/ |
D | pake_message_util.c | 85 …int32_t res = AddByteToJson(payload, FIELD_SALT, params->baseParams.salt.val, params->baseParams.s… in PackagePakeResponseData() 90 …res = AddByteToJson(payload, FIELD_EPK, params->baseParams.epkSelf.val, params->baseParams.epkSelf… in PackagePakeResponseData() 96 res = AddByteToJson(payload, FIELD_NONCE, params->nonce.val, params->nonce.length); in PackagePakeResponseData() 155 …int32_t res = AddByteToJson(payload, FIELD_EPK, params->baseParams.epkSelf.val, params->baseParams… in PackagePakeClientConfirmData() 160 …res = AddByteToJson(payload, FIELD_KCF_DATA, params->baseParams.kcfData.val, params->baseParams.kc… in PackagePakeClientConfirmData() 187 int32_t res = AddByteToJson(payload, FIELD_KCF_DATA, in PackagePakeServerConfirmData()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/iso_protocol_task/ |
D | iso_server_protocol_task.c | 59 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ISO_SALT, params->baseParams.randSelf.val, in PackageServerStartMessage() 61 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_TOKEN, selfTokenBuf->val, selfTokenBuf->length),… in PackageServerStartMessage() 62 … GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_PEER_AUTH_ID, params->baseParams.authIdSelf.val, in PackageServerStartMessage() 141 … GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_PEER_AUTH_ID, params->baseParams.authIdSelf.val, in PackDataForCalTokenServer() 143 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_RETURN_CODE_MAC, tokenToPeer->val, tokenToPeer->… in PackDataForCalTokenServer()
|
D | iso_client_protocol_task.c | 60 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ISO_SALT, params->baseParams.randSelf.val, in IsoClientStartPackData() 62 … GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_PEER_AUTH_ID, params->baseParams.authIdSelf.val, in IsoClientStartPackData() 65 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_SEED, params->seed.val, params->seed.length), re… in IsoClientStartPackData() 127 … GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_PEER_AUTH_ID, params->baseParams.authIdSelf.val, in PackDataForCalToken() 129 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_TOKEN, selfTokenBuf->val, selfTokenBuf->length),… in PackDataForCalToken()
|
/base/security/device_auth/services/authenticators/src/account_related/auth/iso_auth_task/ |
D | iso_auth_server_task.c | 73 if (AddByteToJson(data, FIELD_PAYLOAD, in AddGetTokenDataToJson() 78 …if (AddByteToJson(data, FIELD_TOKEN, params->hmacToken, sizeof(params->hmacToken)) != CLIB_SUCCESS… in AddGetTokenDataToJson() 82 if (AddByteToJson(data, FIELD_SALT, in AddGetTokenDataToJson() 119 …if (AddByteToJson(sendToPeer, FIELD_DEV_ID, params->devIdSelf.val, params->devIdSelf.length) != CL… in PackIsoAuthServerGetTokenMsg() 214 …if (AddByteToJson(data, FIELD_AUTH_RESULT_MAC, authResultMac->val, authResultMac->length) != CLIB_… in PackCalTokenAndSessionKeyMsg()
|
D | iso_auth_client_task.c | 48 if (AddByteToJson(data, FIELD_SALT, in AddBeginDataToJson() 53 if (AddByteToJson(data, FIELD_PAYLOAD, in AddBeginDataToJson() 58 if (AddByteToJson(data, FIELD_SEED, params->seed, sizeof(params->seed)) != CLIB_SUCCESS) { in AddBeginDataToJson() 98 …if (AddByteToJson(sendToPeer, FIELD_DEV_ID, params->devIdSelf.val, params->devIdSelf.length) != CL… in PackIsoAuthClientBeginMsg() 215 …if (AddByteToJson(data, FIELD_TOKEN, params->hmacToken, sizeof(params->hmacToken)) != CLIB_SUCCESS… in PackIsoAuthClientGetTokenMsg()
|
/base/security/device_auth/services/authenticators/src/account_related/auth/pake_v2_auth_task/ |
D | pake_v2_auth_server_task.c | 101 …GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_AUTH_PK_INFO_SIGN, innerTask->params.pkInfoSignSelf… in PrepareAsyServerStepOneData() 103 GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_EPK, innerTask->params.pakeParams.epkSelf.val, in PrepareAsyServerStepOneData() 105 GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_SALT, innerTask->params.pakeParams.salt.val, in PrepareAsyServerStepOneData() 185 GOTO_IF_ERR(AddByteToJson(sendToSelf, FIELD_SESSION_KEY, in SendFinalToOut() 194 GOTO_IF_ERR(AddByteToJson(sendToPeerData, in SendFinalToOut()
|
D | pake_v2_auth_client_task.c | 67 GOTO_IF_ERR(AddByteToJson(data, FIELD_AUTH_PK_INFO_SIGN, innerTask->params.pkInfoSignSelf.val, in AsyAuthClientStepOne() 120 … GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_KCF_DATA, innerTask->params.pakeParams.kcfData.val, in PrepareAsyClientStepTwoData() 124 GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_EPK, innerTask->params.pakeParams.epkSelf.val, in PrepareAsyClientStepTwoData() 194 GOTO_IF_ERR(AddByteToJson(sendToSelf, in SendFinalToOut()
|
/base/security/device_auth/services/mk_agree/src/ |
D | mk_agree_task.c | 48 if (AddByteToJson(payload, FIELD_SALT, pakeTask->clientSalt, SALT_LEN) != HC_SUCCESS) { in GeneratePakeRequestPayload() 53 if (AddByteToJson(payload, FIELD_PUBLIC_KEY, devicePk.val, devicePk.length) != HC_SUCCESS) { in GeneratePakeRequestPayload() 110 if (AddByteToJson(payload, FIELD_SALT, pakeTask->serverSalt, SALT_LEN) != HC_SUCCESS) { in GeneratePakeResponsePayload() 115 if (AddByteToJson(payload, FIELD_PUBLIC_KEY, devicePk.val, devicePk.length) != HC_SUCCESS) { in GeneratePakeResponsePayload() 121 if (AddByteToJson(payload, FIELD_KCF_DATA, kcfData->val, kcfData->length) != HC_SUCCESS) { in GeneratePakeResponsePayload() 247 if (AddByteToJson(sendData, FIELD_PAYLOAD, payloadData.val, payloadData.length) != HC_SUCCESS) { in GeneratePakeRequestData() 344 if (AddByteToJson(sendData, FIELD_PAYLOAD, payloadData.val, payloadData.length) != HC_SUCCESS) { in GeneratePakeResponseData()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/ |
D | pake_v1_server_protocol_task.c | 59 res = AddByteToJson(payload, FIELD_CHALLENGE, params->baseParams.challengeSelf.val, in PackageMsgForResponse() 66 res = AddByteToJson(payload, FIELD_PEER_AUTH_ID, params->baseParams.idSelf.val, in PackageMsgForResponse()
|
D | pake_v1_client_protocol_task.c | 67 res = AddByteToJson(payload, FIELD_PEER_AUTH_ID, params->baseParams.idSelf.val, in PakeRequest() 129 res = AddByteToJson(payload, FIELD_CHALLENGE, params->baseParams.challengeSelf.val, in PackageMsgForClientConfirm()
|
/base/security/device_auth/services/session_manager/src/session/v2/ |
D | dev_session_util.c | 259 …if (AddByteToJson(authData, FIELD_AUTH_ID_SERVER, authIdBuff.val, authIdBuff.length) != HC_SUCCESS… in FillPeerAuthIdIfNeeded() 266 …if (AddByteToJson(authData, FIELD_AUTH_ID_CLIENT, authIdBuff.val, authIdBuff.length) != HC_SUCCESS… in FillPeerAuthIdIfNeeded() 376 … AddByteToJson(authData, FIELD_AUTH_ID_CLIENT, authIdBuff.val, authIdBuff.length) != HC_SUCCESS) { in ReplaceAuthIdWithRandom() 381 … AddByteToJson(authData, FIELD_AUTH_ID_SERVER, authIdBuff.val, authIdBuff.length) != HC_SUCCESS) { in ReplaceAuthIdWithRandom()
|
/base/security/device_auth/services/key_agree_sdk/src/ |
D | key_agree_session.c | 287 …int32_t res = AddByteToJson(payload, FIELD_KCF_DATA, baseParams->kcfData.val, baseParams->kcfData.… in PackagePakeServerConfirmData() 331 …int32_t res = AddByteToJson(payload, FIELD_EPK, baseParams->epkSelf.val, baseParams->epkSelf.lengt… in PackagePakeClientConfirmData() 336 … res = AddByteToJson(payload, FIELD_KCF_DATA, baseParams->kcfData.val, baseParams->kcfData.length); in PackagePakeClientConfirmData() 341 …res = AddByteToJson(payload, FIELD_PEER_AUTH_ID, baseParams->idSelf.val, baseParams->idSelf.length… in PackagePakeClientConfirmData() 468 int32_t res = AddByteToJson(payload, FIELD_SALT, baseParams->salt.val, baseParams->salt.length); in PackagePakeResponseData() 473 res = AddByteToJson(payload, FIELD_EPK, baseParams->epkSelf.val, baseParams->epkSelf.length); in PackagePakeResponseData() 478 …res = AddByteToJson(payload, FIELD_PEER_AUTH_ID, baseParams->idSelf.val, baseParams->idSelf.length… in PackagePakeResponseData()
|
/base/security/device_auth/common_lib/interfaces/ |
D | json_utils.h | 95 int32_t AddByteToJson(CJson *jsonObj, const char *key, const uint8_t *byte, uint32_t len);
|
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/protocol_lib/ |
D | iso_protocol.c | 281 …if (AddByteToJson(json, FIELD_RAND_CLIENT, params->randSelf.val, params->randSelf.length) != HC_SU… in ClientGenRandomBuildEvent() 286 if (AddByteToJson(json, FIELD_AUTH_ID_CLIENT, params->authIdSelf.val, in ClientGenRandomBuildEvent() 380 …if (AddByteToJson(json, FIELD_RAND_SERVER, params->randSelf.val, params->randSelf.length) != HC_SU… in ServerGenTokenBuildEvent() 385 if (AddByteToJson(json, FIELD_AUTH_ID_SERVER, params->authIdSelf.val, in ServerGenTokenBuildEvent() 391 …if (AddByteToJson(json, FIELD_TOKEN_SERVER, params->tokenSelf.val, params->tokenSelf.length) != HC… in ServerGenTokenBuildEvent() 498 …if (AddByteToJson(json, FIELD_TOKEN_CLIENT, params->tokenSelf.val, params->tokenSelf.length) != HC… in ClientGenTokenBuildEvent() 579 if (AddByteToJson(json, FIELD_AUTH_RESULT_MAC, params->authResultMac.val, in ServerGenSessKeyBuildEvent()
|
D | ec_speke_protocol.c | 96 if (AddByteToJson(json, FIELD_AUTH_ID_CLIENT, params->authIdSelf.val, in EcSpekeClientStartReqBuildEvent() 686 if (AddByteToJson(json, FIELD_SALT, params->salt.val, params->salt.length) != HC_SUCCESS) { in EcSpekeServerStartRspBuildEvent() 691 …if (AddByteToJson(json, FIELD_EPK_SERVER, params->epkSelf.val, params->epkSelf.length) != HC_SUCCE… in EcSpekeServerStartRspBuildEvent() 696 if (AddByteToJson(json, FIELD_AUTH_ID_SERVER, params->authIdSelf.val, in EcSpekeServerStartRspBuildEvent() 776 …if (AddByteToJson(json, FIELD_EPK_CLIENT, params->epkSelf.val, params->epkSelf.length) != HC_SUCCE… in EcSpekeClientFinishReqBuildEvent() 781 if (AddByteToJson(json, FIELD_KCF_DATA_CLIENT, params->kcfDataSelf.val, in EcSpekeClientFinishReqBuildEvent() 846 if (AddByteToJson(json, FIELD_KCF_DATA_SERVER, params->kcfDataSelf.val, in EcSpekeServerFinishRspBuildEvent()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/lite_exchange_task/ |
D | iso_client_bind_exchange_task.c | 221 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonce, NONCE_SIZE), res); in ClientBindExchangeStart() 222 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ENC_DATA, encData, sizeof(task->challenge) + TAG… in ClientBindExchangeStart()
|
D | iso_server_bind_exchange_task.c | 208 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ENC_AUTH_TOKEN, encAuthCodeBuf.val, encAuthCodeB… in GenerateAuthCodeAndImport() 209 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonceBuf.val, nonceBuf.length), res); in GenerateAuthCodeAndImport()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/standard_exchange_task/ |
D | standard_exchange_message_util.c | 46 GOTO_ERR_AND_SET_RET(AddByteToJson(data, key, exAuthInfoVal, exAuthInfoLen), res); in PackageNonceAndCipherToJson()
|
D | standard_client_bind_exchange_task.c | 56 … GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_CHALLENGE, params->baseParams.challengeSelf.val, in ExchangeRequest()
|
D | standard_server_bind_exchange_task.c | 53 if (AddByteToJson(payload, FIELD_CHALLENGE, in ExchangeStart()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/ |
D | iso_task_common.c | 110 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonce, sizeof(nonce)), ret); in GenerateEncResult() 111 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ENC_RESULT, out, sizeof(int) + TAG_LEN), ret); in GenerateEncResult() 145 …GOTO_ERR_AND_SET_RET(AddByteToJson(sendToSelf, FIELD_SESSION_KEY, returnSessionKey, params->keyLen… in SendResultToFinalSelf() 189 GOTO_ERR_AND_SET_RET(AddByteToJson(sendToSelf, FIELD_SESSION_KEY, returnKey, in GenEncResult()
|
/base/security/device_auth/services/session_manager/src/session/v2/expand_sub_session/expand_process_lib/ |
D | pub_key_exchange.c | 273 if (AddByteToJson(json, FIELD_AUTH_ID_CLIENT, params->authIdSelf.val, in ClientSendPkInfoBuildEvent() 284 …if (AddByteToJson(json, FIELD_AUTH_PK_CLIENT, params->pkSelf.val, params->pkSelf.length) != HC_SUC… in ClientSendPkInfoBuildEvent() 437 if (AddByteToJson(json, FIELD_AUTH_ID_SERVER, params->authIdSelf.val, in ServerSendAuthCodeBuildEvent() 448 …if (AddByteToJson(json, FIELD_AUTH_PK_SERVER, params->pkSelf.val, params->pkSelf.length) != HC_SUC… in ServerSendAuthCodeBuildEvent()
|
D | auth_code_import.c | 198 if (AddByteToJson(json, FIELD_AUTH_ID_CLIENT, params->authIdSelf.val, in ClientSendDevInfoBuildEvent() 295 if (AddByteToJson(json, FIELD_AUTH_ID_SERVER, params->authIdSelf.val, in ServerSendAuthCodeBuildEvent() 306 …if (AddByteToJson(json, FIELD_AUTH_CODE, params->authCode.val, params->authCode.length) != HC_SUCC… in ServerSendAuthCodeBuildEvent()
|
/base/security/device_auth/test/unittest/deviceauth/unit_test/source/ |
D | account_related_group_auth_dir_test.cpp | 222 (void)AddByteToJson(out, FIELD_SESSION_KEY, sessionKeyTest, sizeof(sessionKeyTest)); 256 (void)AddByteToJson(out, FIELD_SESSION_KEY, sessionKeyTest, sizeof(sessionKeyTest));
|
/base/security/device_auth/test/unittest/tdd_framework/unit_test/services/creds_manager/ |
D | creds_manager_test.cpp | 355 (void)AddByteToJson(credentialJson, FIELD_SERVER_PK, serverPkVal, serverPk.length); in GetAsyCredentialJson() 356 (void)AddByteToJson(credentialJson, FIELD_PK_INFO_SIGNATURE, signatureValue, signature.length); in GetAsyCredentialJson() 1350 AddByteToJson(json, FIELD_SEED, seedBuff.val, seedBuff.length); 1571 AddByteToJson(json, FIELD_SEED, seedBuff.val, seedBuff.length); 1605 AddByteToJson(json, FIELD_SEED, seedBuff.val, seedBuff.length); 1639 AddByteToJson(json, FIELD_SEED, seedBuff.val, seedBuff.length); 1707 AddByteToJson(json, FIELD_SEED, seedBuff.val, seedBuff.length); 1735 AddByteToJson(json, FIELD_SEED, seedBuff.val, seedBuff.length); 1765 AddByteToJson(json, FIELD_SEED, seedBuff.val, seedBuff.length); 1865 AddByteToJson(json, FIELD_NONCE, nonceBuff.val, nonceBuff.length);
|