Home
last modified time | relevance | path

Searched refs:payload (Results 1 – 25 of 82) 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);
59 void *parse_pake_request(const char *payload, enum json_object_data_type data_type);
64 void *parse_pake_response(const char *payload, enum json_object_data_type data_type);
69 void *parse_pake_client_confirm(const char *payload, enum json_object_data_type data_type);
74 void *parse_pake_server_confirm(const char *payload, enum json_object_data_type data_type);
79 void *parse_auth_start_request(const char *payload, enum json_object_data_type data_type);
84 void *parse_auth_start_response(const char *payload, enum json_object_data_type data_type);
89 void *parse_auth_ack_request(const char *payload, enum json_object_data_type data_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 = ConvertJsonToString(GetJsonFieldJson(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/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_;
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
65 iter->second(payload, payloadSize); in CommandDispatch()
120 void DaemonUpdater::CheckCommand(const uint8_t *payload, int payloadSize) in CheckCommand() argument
127 …string bufString(reinterpret_cast<const char *>(payload + sizeof(int64_t)), payloadSize - sizeof(i… in CheckCommand()
148 void DaemonUpdater::DataCommand(const uint8_t *payload, int payloadSize) const in DataCommand() argument
160 string serialStrring(reinterpret_cast<const char *>(payload), PAYLOAD_FIX_RESERVER); in DataCommand()
163 commander_->DoCommand(payload + PAYLOAD_FIX_RESERVER, pld.uncompressSize); in DataCommand()
166 void DaemonUpdater::EraseCommand(const uint8_t *payload, int payloadSize) in EraseCommand() argument
173 commander_->DoCommand(payload, payloadSize); in EraseCommand()
176 void DaemonUpdater::FormatCommand(const uint8_t *payload, int payloadSize) in FormatCommand() argument
[all …]
Ddaemon.cpp98 const uint16_t command, uint8_t *payload, const int payloadSize) in RedirectToTask() argument
114 … ret = TaskCommandDispatch<HdcDaemonUnity>(hTaskInfo, TYPE_UNITY, command, payload, payloadSize); in RedirectToTask()
118 … ret = TaskCommandDispatch<HdcShell>(hTaskInfo, TYPE_SHELL, command, payload, payloadSize); in RedirectToTask()
125 ret = TaskCommandDispatch<HdcFile>(hTaskInfo, TASK_FILE, command, payload, payloadSize); in RedirectToTask()
137 … ret = TaskCommandDispatch<DaemonUpdater>(hTaskInfo, TASK_UPDATER, command, payload, payloadSize); in RedirectToTask()
191 …monSessionHandshake(HSession hSession, const uint32_t channelId, uint8_t *payload, int payloadSize) in DaemonSessionHandshake() argument
194 string s = string(reinterpret_cast<char *>(payload), payloadSize); in DaemonSessionHandshake()
233 …FetchCommand(HSession hSession, const uint32_t channelId, const uint16_t command, uint8_t *payload, in FetchCommand() argument
245 ret = DaemonSessionHandshake(hSession, channelId, payload, payloadSize); in FetchCommand()
250 if (*payload != 0) { in FetchCommand()
[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()
/base/security/device_auth/services/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/authenticators/src/account_unrelated/iso_task/iso_protocol_task/
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 …]
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 …]
/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()
Dadd_auth_info_client.c44 send->payload = request_data; in send_add_request()
56 int32_t ret = parse_add_response_data(&auth_info_client, (add_response_data *)receive->payload); in receive_add_response()
95 struct uint8_buff payload = { NULL, 0, 0 }; in build_add_request_data() local
96 payload.val = (uint8_t *)MALLOC(HC_ADD_AUTH_DATA_BUFF_LEN); in build_add_request_data()
97 if (payload.val == NULL) { in build_add_request_data()
102 payload.size = HC_ADD_AUTH_DATA_BUFF_LEN; in build_add_request_data()
103 payload.length = 0; in build_add_request_data()
106 &plain, HC_ADD_INFO_REQUEST, &payload); in build_add_request_data()
110 FREE(payload.val); in build_add_request_data()
114 send->cipher = payload; in build_add_request_data()
/base/security/device_auth/services/authenticators/inc/account_unrelated/pake_task/
Dpake_message_util.h22 int32_t PackagePakeRequestData(const PakeParams *params, CJson *payload);
24 int32_t PackagePakeResponseData(const PakeParams *params, CJson *payload);
26 int32_t PackagePakeClientConfirmData(const PakeParams *params, CJson *payload);
28 int32_t PackagePakeServerConfirmData(const PakeParams *params, CJson *payload);
/base/security/device_security_level/oem_property/common/
Ddslm_credential_utils.c66 DataBuffer payload; member
72 const char *payload; member
176 const PayloadAttestation *payload = &credCb->load; in VerifyCredentialCb() local
203 ret = EcdsaVerify(&payload->payload, &payload->signature, &last->publicKey, TYPE_ECDSA_SHA_384); in VerifyCredentialCb()
205 … ret = EcdsaVerify(&payload->payload, &payload->signature, &last->publicKey, TYPE_ECDSA_SHA_256); in VerifyCredentialCb()
261 credCb->payload = strtok_s(NULL, ".", &context); in SplitCredentialString()
262 if (context == NULL || credCb->payload == NULL) { in SplitCredentialString()
312 if (attestation->payload.data != NULL) { in FreePayloadAttestation()
313 FREE(attestation->payload.data); in FreePayloadAttestation()
333 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/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/authenticators/src/account_unrelated/iso_task/lite_exchange_task/
Diso_client_unbind_exchange_task.c92 CJson *payload = NULL; in PackDataForStartUnbind() local
95 payload = CreateJson(); in PackDataForStartUnbind()
96 if (payload == NULL) { in PackDataForStartUnbind()
106 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_OPERATION_CODE, params->opCode), res); in PackDataForStartUnbind()
107 …GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_ENC_DATA, encDataBuf->val, encDataBuf->length), … in PackDataForStartUnbind()
108 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonceBuf->val, nonceBuf->length), res); in PackDataForStartUnbind()
109 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in PackDataForStartUnbind()
112 FreeJson(payload); in PackDataForStartUnbind()
/base/security/device_auth/services/authenticators/src/account_unrelated/
Ddas_task_common.c58 CJson *payload = CreateJson(); in DasSendErrorToOut() local
59 if (payload == NULL) { in DasSendErrorToOut()
67 GOTO_ERR_AND_SET_RET(AddIntToJson(payload, FIELD_ERROR_CODE, errCode), res); in DasSendErrorToOut()
68 GOTO_ERR_AND_SET_RET(AddObjToJson(sendToPeer, FIELD_PAYLOAD, payload), res); in DasSendErrorToOut()
76 FreeJson(payload); in DasSendErrorToOut()
379 const CJson *payload = GetObjFromJson(in, FIELD_PAYLOAD); in GetAndCheckAuthIdPeer() local
380 if (payload == NULL) { in GetAndCheckAuthIdPeer()
384 const char *authIdStr = GetStringFromJson(payload, FIELD_PEER_AUTH_ID); in GetAndCheckAuthIdPeer()
421 const CJson *payload = GetObjFromJson(in, FIELD_PAYLOAD); in GetAuthIdPeerFromPayload() local
422 if (payload == NULL) { in GetAuthIdPeerFromPayload()
[all …]
/base/security/device_security_level/oem_property/ohos/
Ddslm_cred_tool.py248 def __init__(self, store_dir: str, file: str, payload: dict):
250 self.payload = payload
279 self.payload['signTime'] = datetime.now().strftime('%Y%m%d%H%M%S')
280 self.payload['version'] = CRED_VERSION
281 … return base64.b64encode(json.dumps(self.payload, ensure_ascii=True).encode('utf8')).decode('utf8')
309 payload = self._gene_payload()
310 head_payload = '{}.{}'.format(head, payload)
336 head, payload, signature, attestation = self._split_file(self.file)
339 self._check_payload(payload)
341 self._check_attestation(attestation, '{}.{}'.format(head, payload), signature)
[all …]
/base/security/device_security_level/services/sa/common/
Ddslm_rpc_process.c47 if (packet->payload == NULL) { in OnPeerMsgReceived()
55 ret = OnPeerMsgRequestInfoReceived(devId, packet->payload, packet->length); in OnPeerMsgReceived()
58 ret = OnPeerMsgResponseInfoReceived(devId, packet->payload, packet->length); in OnPeerMsgReceived()

1234