/base/security/device_auth/frameworks/deviceauth_lite/source/struct/ |
D | parsedata.h | 28 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 …]
|
D | parsedata.c | 37 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 …]
|
D | sec_clone_data.c | 38 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/ |
D | dslm_msg_serialize.c | 72 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/ |
D | flashd_unittest.cpp | 65 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/ |
D | daemon_updater.h | 30 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;
|
D | daemon.cpp | 98 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 …]
|
D | flash_commander.cpp | 56 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()
|
D | daemon_updater.cpp | 41 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 …]
|
D | erase_commander.cpp | 33 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()
|
D | update_commander.cpp | 71 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()
|
D | format_commander.cpp | 34 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()
|
D | update_commander.h | 26 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/ |
D | mk_agree_task.c | 29 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/ |
D | pake_message_util.c | 24 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/ |
D | iso_client_protocol_task.c | 44 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 …]
|
D | iso_server_protocol_task.c | 45 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/ |
D | remove_auth_info_client.c | 49 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()
|
D | remove_auth_info.c | 41 … 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/ |
D | pake_message_util.h | 26 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/ |
D | dslm_credential_utils.c | 67 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/ |
D | hiview_event.c | 64 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/ |
D | pake_v1_server_protocol_task.c | 48 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()
|
D | pake_v1_client_protocol_task.c | 55 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/ |
D | das_task_common.c | 41 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 …]
|