/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_protocol_task/ |
H A D | iso_server_protocol_task.c | 65 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), res); in PackageServerStartMessage() 67 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in PackageServerStartMessage() 68 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in PackageServerStartMessage() 90 GOTO_ERR_AND_SET_RET(GetAuthIdPeerFromPayload(in, &(params->baseParams.authIdSelf), in IsoServerStart() 93 GOTO_ERR_AND_SET_RET(GetAndCheckAuthIdPeer(in, &(params->baseParams.authIdSelf), in IsoServerStart() 95 GOTO_ERR_AND_SET_RET(GetAndCheckKeyLenOnServer(in, params->keyLen), res); in IsoServerStart() 97 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_ISO_SALT, params->baseParams.randPeer.val, in IsoServerStart() 144 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), res); in PackDataForCalTokenServer() 146 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in PackDataForCalTokenServer() 147 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in PackDataForCalTokenServer() [all …]
|
H A D | iso_client_protocol_task.c | 58 … GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_AUTH_FORM, AUTH_FORM_ACCOUNT_UNRELATED), res); in IsoClientStartPackData() 60 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ISO_SALT, params->baseParams.randSelf.val, in IsoClientStartPackData() 64 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), res); in IsoClientStartPackData() 66 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_PEER_USER_TYPE, params->selfUserType), res); in IsoClientStartPackData() 68 GOTO_ERR_AND_SET_RET(AddStringToJson(payload, FIELD_PKG_NAME, params->packageName), res); in IsoClientStartPackData() 69 … GOTO_ERR_AND_SET_RET(AddStringToJson(payload, FIELD_SERVICE_TYPE, params->serviceType), res); in IsoClientStartPackData() 70 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_KEY_LENGTH, params->keyLen), res); in IsoClientStartPackData() 72 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in IsoClientStartPackData() 73 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in IsoClientStartPackData() 130 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in PackDataForCalToken() [all …]
|
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/standard_exchange_task/ |
H A D | standard_client_bind_exchange_task.c | 54 GOTO_ERR_AND_SET_RET(GetPeerChallenge(params, in), res); in ExchangeRequest() 55 GOTO_ERR_AND_SET_RET(GenerateSelfChallenge(params), res); in ExchangeRequest() 56 … GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_CHALLENGE, params->baseParams.challengeSelf.val, in ExchangeRequest() 61 GOTO_ERR_AND_SET_RET(ClientRequestStandardBindExchange(params, &(realTask->params)), res); in ExchangeRequest() 64 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_MESSAGE, PAKE_BIND_EXCHANGE_REQUEST), res); in ExchangeRequest() 65 …GOTO_ERR_AND_SET_RET(PackageNonceAndCipherToJson(&(realTask->params.nonce), &(realTask->params.exI… in ExchangeRequest() 67 GOTO_ERR_AND_SET_RET(AddIntToJson(data, FIELD_PEER_USER_TYPE, params->userType), res); in ExchangeRequest() 68 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, data), res); in ExchangeRequest() 69 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in ExchangeRequest()
|
H A D | standard_server_bind_exchange_task.c | 89 GOTO_ERR_AND_SET_RET(GetPeerChallenge(params, in), res); in ExchangeResponse() 91 …GOTO_ERR_AND_SET_RET(ParseNonceAndCipherFromJson(&(realTask->params.nonce), &(realTask->params.exI… in ExchangeResponse() 106 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_MESSAGE, PAKE_BIND_EXCHANGE_RESPONSE), res); in ExchangeResponse() 112 …GOTO_ERR_AND_SET_RET(PackageNonceAndCipherToJson(&(realTask->params.nonce), &(realTask->params.exI… in ExchangeResponse() 114 GOTO_ERR_AND_SET_RET(AddIntToJson(data, FIELD_PEER_USER_TYPE, params->userType), res); in ExchangeResponse() 115 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, "payload", data), res); in ExchangeResponse() 116 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in ExchangeResponse()
|
H A D | standard_exchange_message_util.c | 46 GOTO_ERR_AND_SET_RET(AddByteToJson(data, key, exAuthInfoVal, exAuthInfoLen), res); in PackageNonceAndCipherToJson()
|
H A D | common_standard_bind_exchange.c | 137 … GOTO_ERR_AND_SET_RET(AddByteToJson(authInfoJson, FIELD_AUTH_ID, pakeParams->baseParams.idSelf.val, in PackageAuthInfo() 139 GOTO_ERR_AND_SET_RET(AddByteToJson(authInfoJson, FIELD_AUTH_PK, exchangeParams->pubKeySelf.val, in PackageAuthInfo() 339 … GOTO_ERR_AND_SET_RET(GetByteFromJson(authInfoJson, FIELD_AUTH_PK, exchangeParams->pubKeyPeer.val, in ParseAuthInfo()
|
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/pake_v2_auth_task/ |
H A D | pake_v2_auth_server_task.c | 90 GOTO_ERR_AND_SET_RET(AddStringToJson(sendToPeer, FIELD_USER_ID, in PrepareAsyServerStepOneData() 92 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_STEP, RET_PAKE_AUTH_FOLLOWER_ONE), ret); in PrepareAsyServerStepOneData() 93 GOTO_ERR_AND_SET_RET(AddStringToJson(sendToPeer, FIELD_DEVICE_ID, in PrepareAsyServerStepOneData() 95 … GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_AUTH_FORM, innerTask->params.authForm), ret); in PrepareAsyServerStepOneData() 98 …GOTO_ERR_AND_SET_RET(AddIntToJson(data, FIELD_AUTH_KEY_ALG_ENCODE, innerTask->params.authKeyAlgEnc… in PrepareAsyServerStepOneData() 99 GOTO_ERR_AND_SET_RET(AddStringToJson(data, FIELD_AUTH_PK_INFO, in PrepareAsyServerStepOneData() 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() 107 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_DATA, data), ret); in PrepareAsyServerStepOneData() [all …]
|
H A D | pake_v2_auth_client_task.c | 118 … GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_AUTH_FORM, innerTask->params.authForm), ret); in PrepareAsyClientStepTwoData() 119 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_STEP, CMD_PAKE_AUTH_MAIN_TWO), ret); in PrepareAsyClientStepTwoData() 120 … GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_KCF_DATA, innerTask->params.pakeParams.kcfData.val, in PrepareAsyClientStepTwoData() 122 GOTO_ERR_AND_SET_RET(AddStringToJson(data, FIELD_DEVICE_ID, in PrepareAsyClientStepTwoData() 124 GOTO_ERR_AND_SET_RET(AddByteToJson(data, FIELD_EPK, innerTask->params.pakeParams.epkSelf.val, in PrepareAsyClientStepTwoData() 126 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_DATA, data), ret); in PrepareAsyClientStepTwoData() 127 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), ret); in PrepareAsyClientStepTwoData()
|
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_task_common/ |
H A D | iso_task_common.c | 123 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonce, sizeof(nonce)), ret); in GenerateEncResult() 125 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), ret); in GenerateEncResult() 126 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), ret); in GenerateEncResult() 127 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_MESSAGE, message), ret); in GenerateEncResult() 144 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_OPERATION_CODE, OP_BIND), res); in SendResultToFinalSelf() 160 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf), res); in SendResultToFinalSelf() 202 GOTO_ERR_AND_SET_RET(AddByteToJson(sendToSelf, FIELD_SESSION_KEY, returnKey, in GenEncResult() 205 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_OPERATION_CODE, params->opCode), res); in GenEncResult() 206 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in GenEncResult() 207 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf), res); in GenEncResult() [all …]
|
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/lite_exchange_task/ |
H A D | iso_client_bind_exchange_task.c | 104 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_NONCE, nonce, NONCE_SIZE), res); in DecAndImportAuthCode() 105 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_ENC_AUTH_TOKEN, encData, encDataLen), res); in DecAndImportAuthCode() 230 … GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_MESSAGE, ISO_CLIENT_BIND_EXCHANGE_CMD), res); in ClientBindExchangeStart() 231 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonce, NONCE_SIZE), res); in ClientBindExchangeStart() 232 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ENC_DATA, encData, sizeof(task->challenge) + TAG… in ClientBindExchangeStart() 233 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in ClientBindExchangeStart() 234 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in ClientBindExchangeStart()
|
H A D | iso_server_bind_exchange_task.c | 88 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_ENC_DATA, encData, ENC_CHALLENGE_LEN), res); in DecryptChallenge() 94 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_NONCE, nonce, NONCE_SIZE), res); in DecryptChallenge() 223 … GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_MESSAGE, ISO_SERVER_BIND_EXCHANGE_RET), res); in GenerateAuthCodeAndImport() 224 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ENC_AUTH_TOKEN, encAuthCodeBuf.val, encAuthCodeB… in GenerateAuthCodeAndImport() 225 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonceBuf.val, nonceBuf.length), res); in GenerateAuthCodeAndImport() 226 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in GenerateAuthCodeAndImport() 227 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in GenerateAuthCodeAndImport()
|
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/ |
H A D | das_task_common.c | 62 … GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_AUTH_FORM, AUTH_FORM_ACCOUNT_UNRELATED), res); in DasSendErrorToOut() 63 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToSelf, FIELD_ERROR_CODE, errCode), res); in DasSendErrorToOut() 65 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_ERROR_CODE, errCode), res); in DasSendErrorToOut() 66 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in DasSendErrorToOut() 67 GOTO_ERR_AND_SET_RET(AddIntToJson(sendToPeer, FIELD_MESSAGE, ERR_MESSAGE), res); in DasSendErrorToOut() 69 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_PEER, sendToPeer), res); in DasSendErrorToOut() 70 GOTO_ERR_AND_SET_RET(AddObjToJson(out, FIELD_SEND_TO_SELF, sendToSelf), res); in DasSendErrorToOut()
|
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/ |
H A D | pake_task_common.c | 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()
|
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/creds_manager/ |
H A D | asy_token_manager.c | 648 …GOTO_ERR_AND_SET_RET(ExcuteCredMgrCmd(osAccountId, QUERY_SELF_CREDENTIAL_INFO, input, output), res… in GetTokenFromPlugin() 649 GOTO_ERR_AND_SET_RET(GenerateTokenFromJson(output, token), res); in GetTokenFromPlugin() 866 GOTO_ERR_AND_SET_RET(AddByteToJson(out, FIELD_DEVICE_PK, publicKeyVal, publicKey.length), ret); in GetRegisterProof() 867 GOTO_ERR_AND_SET_RET(AddStringToJson(out, FIELD_USER_ID, userId), ret); in GetRegisterProof() 868 GOTO_ERR_AND_SET_RET(AddStringToJson(out, FIELD_DEVICE_ID, deviceId), ret); in GetRegisterProof() 869 GOTO_ERR_AND_SET_RET(AddStringToJson(out, FIELD_VERSION, version), ret); in GetRegisterProof() 1114 GOTO_ERR_AND_SET_RET(memcpy_s(token->pkInfoStr.val, token->pkInfoStr.length, in GetToken() 1117 GOTO_ERR_AND_SET_RET(memcpy_s(token->pkInfoSignature.val, token->pkInfoSignature.length, in GetToken() 1120 GOTO_ERR_AND_SET_RET(memcpy_s(token->serverPk.val, token->serverPk.length, in GetToken()
|
/ohos5.0/base/security/device_auth/services/frameworks/inc/ |
H A D | common_defs.h | 226 #define GOTO_ERR_AND_SET_RET(x, res) do { \ macro
|
/ohos5.0/base/security/device_auth/services/identity_manager/src/ |
H A D | cert_operation.c | 670 GOTO_ERR_AND_SET_RET(AddCertInfoToJson(peerCertInfo, input), res); in GetSharedSecretByPeerCertFromPlugin() 671 …GOTO_ERR_AND_SET_RET(ExcuteCredMgrCmd(osAccountId, GET_SHARED_SECRET_BY_PEER_CERT, input, output),… in GetSharedSecretByPeerCertFromPlugin()
|