Home
last modified time | relevance | path

Searched refs:payload (Results 1 – 25 of 76) sorted by relevance

1234

/base/security/device_auth/frameworks/deviceauth_lite/source/struct/
Dparsedata.h28 void *parse_##d_name(const char *payload, enum json_object_data_type data_type) \
30 (void)payload; \
55 void *parse_payload(const char *payload, enum json_object_data_type data_type);
63 void *parse_pake_response(const char *payload, enum json_object_data_type data_type);
71 void *parse_pake_server_confirm(const char *payload, enum json_object_data_type data_type);
79 void *parse_auth_start_response(const char *payload, enum json_object_data_type data_type);
87 void *parse_auth_ack_response(const char *payload, enum json_object_data_type data_type);
91 void *parse_add_auth_info_data(const char *payload, enum json_object_data_type data_type);
96 void *parse_rmv_auth_info_request(const char *payload, enum json_object_data_type data_type);
101 void *parse_rmv_auth_info_response(const char *payload, enum json_object_data_type type);
[all …]
Dparsedata.c37 const char *payload = NULL; in parse_data() local
53 payload = json_to_string(obj_value); in parse_data()
54 if (payload == NULL) { in parse_data()
60 int32_t len = strlen(payload); in parse_data()
68 (void)memcpy_s(tmp_data, len, payload, len); in parse_data()
71 FREE((char *)payload); in parse_data()
75 if (payload != NULL) { in parse_data()
76 FREE((char *)payload); in parse_data()
93 void *parse_payload(const char *payload, enum json_object_data_type data_type) in parse_payload() argument
96 return parse_json(payload); in parse_payload()
[all …]
Dsec_clone_data.c38 static void *get_single_json_from_buff(const char *payload, const char *name, enum json_object_data… in get_single_json_from_buff() argument
46 json_handle obj = parse_payload(payload, data_type); in get_single_json_from_buff()
121 void *sec_clone_parse_client_request(const char *payload, enum json_object_data_type data_type) in sec_clone_parse_client_request() argument
123 return get_single_json_from_buff(payload, "clientChallenge", data_type); in sec_clone_parse_client_request()
136 void *sec_clone_parse_client_ack(const char *payload, enum json_object_data_type data_type) in sec_clone_parse_client_ack() argument
138 return get_single_json_from_buff(payload, "SecData", data_type); in sec_clone_parse_client_ack()
151 void *sec_clone_parse_start_resp(const char *payload, enum json_object_data_type data_type) in sec_clone_parse_start_resp() argument
153 return get_single_json_from_buff(payload, "serverProof", data_type); in sec_clone_parse_start_resp()
156 void *sec_clone_parse_ack_resp(const char *payload, enum json_object_data_type data_type) in sec_clone_parse_ack_resp() argument
158 return get_single_json_from_buff(payload, "cloneReturn", data_type); in sec_clone_parse_ack_resp()
[all …]
/base/security/device_security_level/services/common/
Ddslm_msg_serialize.c72 char *payload = NULL; in ParseMessage() local
79 payload = DslmConvertJsonToString(DslmGetJsonFieldJson(handle, FIELD_PAYLOAD)); in ParseMessage()
80 if (payload == NULL) { in ParseMessage()
85 FREE(payload); in ParseMessage()
89 packet->payload = (uint8_t *)payload; in ParseMessage()
90 packet->length = strlen(payload) + 1; // for the end flag '\0' in ParseMessage()
102 if (packet->payload != NULL) { in FreeMessagePacket()
103 FREE(packet->payload); in FreeMessagePacket()
104 packet->payload = NULL; in FreeMessagePacket()
/base/update/updater/test/unittest/flashd_test/
Dflashd_unittest.cpp65 uint8_t *payload = nullptr; variable
67 commander->DoCommand(payload, payloadSize);
70 payload = reinterpret_cast<uint8_t*>(cmdstr.data());
72 commander->DoCommand(payload, payloadSize);
76 payload = reinterpret_cast<uint8_t*>(cmdstr.data());
78 commander->DoCommand(payload, payloadSize);
82 payload = reinterpret_cast<uint8_t*>(cmdstr.data());
84 commander->DoCommand(payload, payloadSize);
99 uint8_t *payload = nullptr; variable
101 commander->DoCommand(payload, payloadSize);
[all …]
/base/update/updater/services/flashd/daemon/
Ddaemon_updater.h30 bool CommandDispatch(const uint16_t command, uint8_t *payload, const int payloadSize) override;
34 void CheckCommand(const uint8_t *payload, int payloadSize);
35 void DataCommand(const uint8_t *payload, int payloadSize) const;
36 void EraseCommand(const uint8_t *payload, int payloadSize);
37 void FormatCommand(const uint8_t *payload, int payloadSize);
44 std::unordered_map<uint16_t, std::function<void(uint8_t *payload, int payloadSize)>> cmdFunc_;
53 bool CommandDispatch(const uint16_t command, uint8_t *payload, const int payloadSize) override;
Ddaemon.cpp98 const uint16_t command, uint8_t *payload, const int payloadSize) in RedirectToTask() argument
106 … ret = TaskCommandDispatch<HdcDaemonUnity>(hTaskInfo, TYPE_UNITY, command, payload, payloadSize); in RedirectToTask()
110 … ret = TaskCommandDispatch<HdcShell>(hTaskInfo, TYPE_SHELL, command, payload, payloadSize); in RedirectToTask()
117 ret = TaskCommandDispatch<HdcFile>(hTaskInfo, TASK_FILE, command, payload, payloadSize); in RedirectToTask()
122 … ret = TaskCommandDispatch<HdcDaemonUnity>(hTaskInfo, TYPE_UNITY, command, payload, payloadSize); in RedirectToTask()
134 … ret = TaskCommandDispatch<DaemonUpdater>(hTaskInfo, TASK_UPDATER, command, payload, payloadSize); in RedirectToTask()
143 … ret = TaskCommandDispatch<InvalidDaemon>(hTaskInfo, TASK_FAKE, command, payload, payloadSize); in RedirectToTask()
196 …monSessionHandshake(HSession hSession, const uint32_t channelId, uint8_t *payload, int payloadSize) in DaemonSessionHandshake() argument
199 string s = string((char *)payload, payloadSize); in DaemonSessionHandshake()
237 …FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, in FetchCommand() argument
[all …]
Dflash_commander.cpp56 void FlashCommander::DoCommand(const uint8_t *payload, int payloadSize) in DoCommand() argument
58 if (payload == nullptr || payloadSize <= 0) { in DoCommand()
64 auto writeSize = DoFlash(payload, payloadSize); in DoCommand()
95 int FlashCommander::DoFlash(const uint8_t *payload, int payloadSize) in DoFlash() argument
98 if (!InitPartition(partName_, payload, payloadSize)) { in DoFlash()
110 if (partition_->DoFlash(payload, writeSize) != 0) { in DoFlash()
Ddaemon_updater.cpp41 bool DaemonUpdater::CommandDispatch(const uint16_t command, uint8_t *payload, const int payloadSize) in CommandDispatch() argument
64 iter->second(payload, payloadSize); in CommandDispatch()
118 void DaemonUpdater::CheckCommand(const uint8_t *payload, int payloadSize) in CheckCommand() argument
125 …string bufString(reinterpret_cast<const char *>(payload + sizeof(int64_t)), payloadSize - sizeof(i… in CheckCommand()
146 void DaemonUpdater::DataCommand(const uint8_t *payload, int payloadSize) const in DataCommand() argument
158 string serialStrring(reinterpret_cast<const char *>(payload), PAYLOAD_FIX_RESERVER); in DataCommand()
161 commander_->DoCommand(payload + PAYLOAD_FIX_RESERVER, pld.uncompressSize); in DataCommand()
164 void DaemonUpdater::EraseCommand(const uint8_t *payload, int payloadSize) in EraseCommand() argument
171 commander_->DoCommand(payload, payloadSize); in EraseCommand()
174 void DaemonUpdater::FormatCommand(const uint8_t *payload, int payloadSize) in FormatCommand() argument
[all …]
Derase_commander.cpp33 void EraseCommander::DoCommand(const uint8_t *payload, int payloadSize) in DoCommand() argument
36 if (payload == nullptr || payloadSize <= 0) { in DoCommand()
42 std::string cmdParam(reinterpret_cast<const char *>(payload), payloadSize); in DoCommand()
Dupdate_commander.cpp71 void UpdateCommander::DoCommand(const uint8_t *payload, int payloadSize) in DoCommand() argument
73 if (payload == nullptr || payloadSize <= 0) { in DoCommand()
79 if (!DoUpdate(payload, payloadSize)) { in DoCommand()
85 bool UpdateCommander::DoUpdate(const uint8_t *payload, int payloadSize) in DoUpdate() argument
98 if (!Updater::Utils::WriteFully(fd_, payload, writeSize)) { in DoUpdate()
Dformat_commander.cpp34 void FormatCommander::DoCommand(const uint8_t *payload, int payloadSize) in DoCommand() argument
37 if (payload == nullptr || payloadSize <= 0) { in DoCommand()
43 std::string cmdParam(reinterpret_cast<const char *>(payload), payloadSize); in DoCommand()
Dupdate_commander.h26 void DoCommand(const uint8_t *payload, int payloadSize) override;
31 bool DoUpdate(const uint8_t *payload, int payloadSize);
/base/security/device_auth/services/mk_agree/src/
Dmk_agree_task.c29 static int32_t GeneratePakeRequestPayload(PakeMkAgreeTask *pakeTask, CJson *payload) in GeneratePakeRequestPayload() argument
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()
64 CJson *payload = CreateJson(); in GeneratePakeRequestPayloadData() local
65 if (payload == NULL) { in GeneratePakeRequestPayloadData()
69 int32_t res = GeneratePakeRequestPayload(pakeTask, payload); in GeneratePakeRequestPayloadData()
72 FreeJson(payload); in GeneratePakeRequestPayloadData()
75 char *payloadStr = PackJsonToString(payload); in GeneratePakeRequestPayloadData()
76 FreeJson(payload); in GeneratePakeRequestPayloadData()
97 …_t GeneratePakeResponsePayload(PakeMkAgreeTask *pakeTask, const Uint8Buff *kcfData, CJson *payload) in GeneratePakeResponsePayload() argument
[all …]
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/
Dpake_message_util.c24 int32_t PackagePakeRequestData(const PakeParams *params, CJson *payload) in PackagePakeRequestData() argument
29 if (AddBoolToJson(payload, FIELD_SUPPORT_256_MOD, is256ModSupported) != HC_SUCCESS) { in PackagePakeRequestData()
33 if (AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode) != HC_SUCCESS) { in PackagePakeRequestData()
38 if (AddStringToJson(payload, FIELD_PKG_NAME, params->packageName) != HC_SUCCESS) { in PackagePakeRequestData()
42 if (AddStringToJson(payload, FIELD_SERVICE_TYPE, params->serviceType) != HC_SUCCESS) { in PackagePakeRequestData()
46 if (AddIntToJson(payload, FIELD_PEER_USER_TYPE, params->userType) != HC_SUCCESS) { in PackagePakeRequestData()
83 int32_t PackagePakeResponseData(const PakeParams *params, CJson *payload) in PackagePakeResponseData() argument
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()
[all …]
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_protocol_task/
Diso_client_protocol_task.c44 CJson *payload = NULL; in IsoClientStartPackData() local
46 payload = CreateJson(); in IsoClientStartPackData()
47 if (payload == NULL) { in IsoClientStartPackData()
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()
64 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), res); in IsoClientStartPackData()
65 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_SEED, params->seed.val, params->seed.length), re… 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()
[all …]
Diso_server_protocol_task.c45 CJson *payload = NULL; in PackageServerStartMessage() local
47 payload = CreateJson(); in PackageServerStartMessage()
48 if (payload == NULL) { in PackageServerStartMessage()
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()
64 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_PEER_USER_TYPE, params->selfUserType), res); in PackageServerStartMessage()
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()
70 FreeJson(payload); in PackageServerStartMessage()
[all …]
/base/security/device_auth/frameworks/deviceauth_lite/source/auth_info/
Dremove_auth_info_client.c49 send->payload = request_data; in send_remove_request()
62 …32_t ret = parse_remove_response_data(&auth_info_client, (remove_response_data *)receive->payload); in receive_remove_response()
75 struct uint8_buff payload = { NULL, 0, 0 }; in build_remove_request_data() local
101 payload.val = (uint8_t *)MALLOC(HC_RM_AUTH_DATA_BUFF_LEN); in build_remove_request_data()
102 if (payload.val == NULL) { in build_remove_request_data()
107 payload.size = HC_RM_AUTH_DATA_BUFF_LEN; in build_remove_request_data()
108 payload.length = 0; in build_remove_request_data()
111 &plain, "hichain_remove_info_request", &payload); in build_remove_request_data()
115 FREE(payload.val); in build_remove_request_data()
118 send->cipher = payload; in build_remove_request_data()
Dremove_auth_info.c41 … int32_t ret = parse_remove_request_data(hichain, (remove_request_data *)receive->payload, &cache); in send_remove_response()
58 send->payload = send_data; in send_remove_response()
68 static int32_t get_field_from_request_payload(struct uint8_buff *payload, int32_t *user_type,
145 static int32_t get_field_from_request_payload(struct uint8_buff *payload, int32_t *user_type, in get_field_from_request_payload() argument
148 …struct remove_auth_data *rmv_auth_data = parse_rmv_auth_info_data((char *)payload->val, JSON_STRIN… in get_field_from_request_payload()
/base/security/device_auth/services/legacy/authenticators/inc/account_unrelated/pake_task/
Dpake_message_util.h26 int32_t PackagePakeRequestData(const PakeParams *params, CJson *payload);
28 int32_t PackagePakeResponseData(const PakeParams *params, CJson *payload);
30 int32_t PackagePakeClientConfirmData(const PakeParams *params, CJson *payload);
32 int32_t PackagePakeServerConfirmData(const PakeParams *params, CJson *payload);
/base/security/device_security_level/oem_property/common/
Ddslm_credential_utils.c67 DataBuffer payload; member
73 const char *payload; member
177 const PayloadAttestation *payload = &credCb->load; in VerifyCredentialCb() local
204 ret = EcdsaVerify(&payload->payload, &payload->signature, &last->publicKey, TYPE_ECDSA_SHA_384); in VerifyCredentialCb()
206 … ret = EcdsaVerify(&payload->payload, &payload->signature, &last->publicKey, TYPE_ECDSA_SHA_256); in VerifyCredentialCb()
262 credCb->payload = strtok_s(NULL, ".", &context); in SplitCredentialString()
263 if (context == NULL || credCb->payload == NULL) { in SplitCredentialString()
313 if (attestation->payload.data != NULL) { in FreePayloadAttestation()
314 FREE(attestation->payload.data); in FreePayloadAttestation()
334 DataBuffer *payload = &attestation->payload; in ParsePayloadAttestation() local
[all …]
/base/hiviewdfx/hievent_lite/frameworks/
Dhiview_event.c64 e.payload = NULL; in HiEventPrintf()
67 e.payload = encodeBuffer; in HiEventPrintf()
82 event->payload = (uint8 *)HIVIEW_MemAlloc(MEM_POOL_HIVIEW_ID, SINGLE_VALUE_MAX_LEN * num); in HiEventCreate()
83 if (event->payload == NULL) { in HiEventCreate()
99 … if (g_hiviewConfig.eventSwitch == HIVIEW_FEATURE_OFF || event == NULL || event->payload == NULL || in HiEventPutInteger()
106 encodeLen = HiEventEncode((uint8)key, value, 1, event->payload + event->common.len); in HiEventPutInteger()
108 encodeLen = HiEventEncode((uint8)key, value, 0, event->payload + event->common.len); in HiEventPutInteger()
116 … if (g_hiviewConfig.eventSwitch == HIVIEW_FEATURE_OFF || event == NULL || event->payload == NULL) { in HiEventReport()
125 HIVIEW_MemFree(MEM_POOL_HIVIEW_ID, event->payload); in HiEventReport()
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/
Dpake_v1_server_protocol_task.c48 CJson *payload = GetObjFromJson(out, FIELD_PAYLOAD); in PackageMsgForResponse() local
49 if (payload == NULL) { in PackageMsgForResponse()
53 res = PackagePakeResponseData(params, payload); in PackageMsgForResponse()
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()
165 CJson *payload = GetObjFromJson(out, FIELD_PAYLOAD); in PakeServerConfirm() local
166 if (payload == NULL) { in PakeServerConfirm()
170 res = PackagePakeServerConfirmData(params, payload); in PakeServerConfirm()
Dpake_v1_client_protocol_task.c55 CJson *payload = GetObjFromJson(out, FIELD_PAYLOAD); in PakeRequest() local
56 if (payload == NULL) { in PakeRequest()
60 res = PackagePakeRequestData(params, payload); in PakeRequest()
67 res = AddByteToJson(payload, FIELD_PEER_AUTH_ID, params->baseParams.idSelf.val, in PakeRequest()
75 res = AddIntToJson(payload, FIELD_KEY_LENGTH, params->returnKey.length); in PakeRequest()
118 CJson *payload = GetObjFromJson(out, FIELD_PAYLOAD); in PackageMsgForClientConfirm() local
119 if (payload == NULL) { in PackageMsgForClientConfirm()
123 res = PackagePakeClientConfirmData(params, payload); in PackageMsgForClientConfirm()
129 res = AddByteToJson(payload, FIELD_CHALLENGE, params->baseParams.challengeSelf.val, in PackageMsgForClientConfirm()
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/
Ddas_task_common.c41 CJson *payload = CreateJson(); in DasSendErrorToOut() local
42 if (payload == NULL) { in DasSendErrorToOut()
50 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_ERROR_CODE, errCode), res); in DasSendErrorToOut()
51 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in DasSendErrorToOut()
59 FreeJson(payload); in DasSendErrorToOut()
362 const CJson *payload = GetObjFromJson(in, FIELD_PAYLOAD); in GetAndCheckAuthIdPeer() local
363 if (payload == NULL) { in GetAndCheckAuthIdPeer()
367 const char *authIdStr = GetStringFromJson(payload, FIELD_PEER_AUTH_ID); in GetAndCheckAuthIdPeer()
404 const CJson *payload = GetObjFromJson(in, FIELD_PAYLOAD); in GetAuthIdPeerFromPayload() local
405 if (payload == NULL) { in GetAuthIdPeerFromPayload()
[all …]

1234