Home
last modified time | relevance | path

Searched refs:tlv (Results 1 – 25 of 45) sorted by relevance

12

/ohos5.0/base/security/device_auth/common_lib/impl/src/
H A Dhc_tlv_parser.c33 if (tlv->tag != tlv->checkTag) { in ParseTlvHead()
60 int ret = tlv->parse(tlv, parcel, strict); in ParseTlvNode()
64 return ret + sizeof(tlv->tag) + sizeof(tlv->length); in ParseTlvNode()
71 int32_t bodyLen = tlv->getlen(tlv); in GetlenTlvNode()
75 tlv->length = bodyLen + sizeof(tlv->tag) + sizeof(tlv->length); in GetlenTlvNode()
83 tlv->deinit(tlv); in DeinitTlvNode()
89 int32_t bodyLen = tlv->getlen(tlv); in EncodeTlvNode()
103 return sizeof(tlv->tag) + sizeof(tlv->length); in EncodeTlvNode()
117 encodeLen = tlv->encode(tlv, parcel); in EncodeTlvNode()
371 (void)memset_s(&tlv->base, sizeof(tlv->base), 0, sizeof(tlv->base)); in InitTlvBuffer()
[all …]
/ohos5.0/base/security/device_auth/common_lib/interfaces/
H A Dhc_tlv_parser.h56 (void)memset_s(&tlv->base, sizeof(tlv->base), 0, sizeof(tlv->base)); \
69 tlv->offsetCount = index; \
111 return tlv->length; \
148 (void)memset_s(&tlv->base, sizeof(tlv->base), 0, sizeof(tlv->base)); \
153 tlv->base.checkTag = checkTag; \
167 int32_t GetlenTlvNode(TlvBase *tlv);
168 void DeinitTlvNode(TlvBase *tlv);
173 void DeinitTlvStruct(TlvBase *tlv);
187 void DeinitTlvBuffer(TlvBase *tlv);
198 void DeinitTlvString(TlvBase *tlv);
[all …]
/ohos5.0/base/security/device_security_level/baselib/utils/src/
H A Dutils_tlv.c41 tlv->tag = ((TlvCommon *)buffer)->tag; in ParseTlv()
42 tlv->len = ((TlvCommon *)buffer)->len; in ParseTlv()
43 tlv->value = (uint8_t *)buffer + TLV_TLV_HEAD_LEN; in ParseTlv()
58 ((TlvCommon *)buffer)->tag = tlv->tag; in AppendTlv()
59 ((TlvCommon *)buffer)->len = tlv->len; in AppendTlv()
60 if (tlv->len != 0 && tlv->value != NULL) { in AppendTlv()
61 …y_s(buffer + TLV_TLV_HEAD_LEN, boundary - buffer - TLV_TLV_HEAD_LEN, tlv->value, tlv->len) != EOK)… in AppendTlv()
72 if (tlv == NULL || buff == NULL || buffSize == NULL) { in Serialize()
81 curr = AppendTlv(curr, &tlv[index], boundary, &retCode); in Serialize()
92 if (buff == NULL || tlv == NULL || tlvCount == NULL) { in Deserialize()
[all …]
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/device_cert_manager/src/
H A Ddcm_asn1.c30 uint32_t len = tlv->size; in BuildTlvHeader()
32 HKS_ASN1_ENCODE_BYTE(hptr, tlv->type); in BuildTlvHeader()
35 if ((tlv->type == ASN_1_TAG_TYPE_BIT_STR) || ((tlv->type == ASN_1_TAG_TYPE_INT) && in BuildTlvHeader()
60 struct HksAsn1Blob value = *tlv; in Asn1InsertValue()
61 if ((tlv->type != ASN_1_TAG_TYPE_OCT_STR) && (tlv->type != ASN_1_TAG_TYPE_BIT_STR)) { in Asn1InsertValue()
86 obj->header.type = tlv->type; in Asn1InsertValue()
89 obj->value.type = tlv->type; in Asn1InsertValue()
99 …if ((CheckBlob(buf) != HKS_SUCCESS) || (CheckAsn1Blob(tlv) != HKS_SUCCESS) || (tlv->size > ASN_1_M… in DcmAsn1InsertValue()
105 if (memcpy_s(buf->data, buf->size, tlv->data, tlv->size) != EOK) { in DcmAsn1InsertValue()
109 buf->data += tlv->size; in DcmAsn1InsertValue()
[all …]
/ohos5.0/base/startup/appspawn/standard/
H A Dappspawn_msgmgr.c56 *len = tlv->dataLen; in GetAppSpawnMsgExtInfo()
225 switch (tlv->tlvType) { in CheckMsgTlv()
252 APPSPAWN_CHECK(tlvLen <= tlv->tlvLen, in CheckMsgTlv()
253 …rn APPSPAWN_MSG_INVALID, "Invalid property tlv %{public}d %{public}d ", tlv->tlvType, tlv->tlvLen); in CheckMsgTlv()
266 if (tlv == NULL) { in DecodeAppSpawnMsg()
271 tlv->tlvType, tlv->tlvLen, currLen + sizeof(AppSpawnMsg)); in DecodeAppSpawnMsg()
274 tlv->tlvType, tlv->tlvLen, currLen + sizeof(AppSpawnMsg)); // show in msg offset in DecodeAppSpawnMsg()
280 currLen += tlv->tlvLen; in DecodeAppSpawnMsg()
286 currLen += tlv->tlvLen; in DecodeAppSpawnMsg()
358 if (tlv->tlvType != TLV_MAX) { in DumpMsgExtInfo()
[all …]
/ohos5.0/base/startup/appspawn/interfaces/innerkits/client/
H A Dappspawn_msg.c158 tlv.tlvType = TLV_MAX; in AddAppDataEx()
161 int ret = strcpy_s(tlv.tlvName, sizeof(tlv.tlvName), name); in AddAppDataEx()
171 ret = AddAppDataToBlock(block, (uint8_t *)&tlv, sizeof(tlv), 0); in AddAppDataEx()
177 ret = AddAppDataToTail(reqNode, (uint8_t *)&tlv, sizeof(tlv), 0); in AddAppDataEx()
199 AppSpawnTlv tlv; in AddAppData() local
200 tlv.tlvLen = realLen; in AddAppData()
201 tlv.tlvType = tlvType; in AddAppData()
210 ret = AddAppDataToBlock(block, (uint8_t *)&tlv, sizeof(tlv), 0); in AddAppData()
219 ret = AddAppDataToTail(reqNode, (uint8_t *)&tlv, sizeof(tlv), 0); in AddAppData()
242 tlv->tlvLen = flagsLen; in SetFlagsTlv()
[all …]
/ohos5.0/foundation/communication/netstack/utils/tlv_utils/src/
H A Dtlv_utils.cpp46 tlv->tag_ = (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->tag_; in ParseTlv()
47 tlv->len_ = (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->len_; in ParseTlv()
48 tlv->value_ = const_cast<uint8_t *>(buffer) + TLV_TLV_HEAD_LEN; in ParseTlv()
63 (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->tag_ = tlv->tag_; in AppendTlv()
64 (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->len_ = tlv->len_; in AppendTlv()
65 if (tlv->len_ != 0 && tlv->value_ != nullptr) { in AppendTlv()
66 …emcpy_s(buffer + TLV_TLV_HEAD_LEN, boundary - buffer - TLV_TLV_HEAD_LEN, tlv->value_, tlv->len_) != in AppendTlv()
79 if (tlv == nullptr || buff == nullptr || buffSize == nullptr) { in Serialize()
87 curr = AppendTlv(curr, &tlv[index], boundary, &retCode); in Serialize()
99 if (tlv == nullptr || buff == nullptr || tlvCount == nullptr) { in Deserialize()
[all …]
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/
H A Dstream_packetizer.cpp56 TwoLevelsTlv tlv(originData_->GetExtBuffer(), originData_->GetExtBufferLen()); in PacketizeStream() local
57 if (tlv.Packetize(data.get(), extSize_, hdrSize_) != 0) { in PacketizeStream()
76 tlv.GetVersion(), tlv.GetTlvNums(), extSize_, tlv.GetExtLen(), tlv.GetCheckSum()); in PacketizeStream()
/ohos5.0/foundation/communication/netstack/utils/tlv_utils/include/
H A Dtlv_utils.h74 …static uint8_t *ParseTlv(const uint8_t *buffer, TlvCommon *tlv, const uint8_t *boundary, uint32_t …
75 …static uint8_t *AppendTlv(uint8_t *buffer, const TlvCommon *tlv, const uint8_t *boundary, uint32_t…
76 …static uint32_t Serialize(const TlvCommon *tlv, uint32_t tlvCount, uint8_t *buff, uint32_t maxBuff…
78 …static uint32_t Deserialize(const uint8_t *buff, uint32_t buffSize, TlvCommon *tlv, uint32_t maxTl…
80 static uint32_t GenerateTlv(DfxMessage &msg, TlvCommon *tlv, uint32_t *tlvCount);
/ohos5.0/drivers/peripheral/user_auth/hdi_service/coauth/inc/
H A Dexecutor_message.h49 ExecutorResultInfo *CreateExecutorResultInfo(const Buffer *tlv);
54 bool CheckRemoteExecutorInfo(const Buffer *tlv, ExecutorInfoHal *infoToCheck);
55 ResultCode CreateScheduleInfo(const Buffer *tlv, Uint8Array peerUdid, ScheduleInfoParam *scheduleIn…
56 ResultCode CreateAuthResultInfo(const Buffer *tlv, AuthResultParam *authResultInfo);
/ohos5.0/base/startup/appspawn/test/unittest/
H A Dapp_spawn_test_helper.cpp648 if (tlv.tlvLen > bufferLen) { in AddOneTlv()
651 int ret = memcpy_s(buffer, bufferLen, &tlv, sizeof(tlv)); in AddOneTlv()
653 ret = memcpy_s(buffer + sizeof(tlv), bufferLen - sizeof(tlv), data, tlv.tlvLen - sizeof(tlv)); in AddOneTlv()
674 AppSpawnTlv tlv = {}; in AddBaseTlv() local
675 tlv.tlvType = TLV_MSG_FLAGS; in AddBaseTlv()
676 tlv.tlvLen = sizeof(AppSpawnTlv) + sizeof(flags); in AddBaseTlv()
678 APPSPAWN_CHECK(ret == 0, return -1, "Failed add tlv %{public}u", tlv.tlvType); in AddBaseTlv()
679 currLen += tlv.tlvLen; in AddBaseTlv()
682 tlv.tlvType = TLV_PERMISSION; in AddBaseTlv()
683 tlv.tlvLen = sizeof(AppSpawnTlv) + sizeof(flags); in AddBaseTlv()
[all …]
H A Dapp_spawn_test_helper.h128 int AppSpawnReqMsgSetFlags(AppSpawnReqMsgHandle reqHandle, uint32_t tlv, uint32_t flags) in AppSpawnReqMsgSetFlags() argument
132 if (tlv == TLV_MSG_FLAGS) { in AppSpawnReqMsgSetFlags()
134 } else if (tlv == TLV_PERMISSION) { in AppSpawnReqMsgSetFlags()
/ohos5.0/foundation/ability/ability_lite/frameworks/want_lite/src/
H A Dwant.cpp128 void FreeTlvStruct(Tlv *tlv) in FreeTlvStruct() argument
130 AdapterFree(tlv->entity); in FreeTlvStruct()
131 AdapterFree(tlv); in FreeTlvStruct()
153 bool UpdateWantData(Want *want, Tlv *tlv) in UpdateWantData() argument
157 void *newWantData = AdapterMalloc(tlv->totalLen + want->dataLength); in UpdateWantData()
162 …memcpy_s((unsigned char*)newWantData + want->dataLength, tlv->totalLen, tlv->entity, tlv->totalLen… in UpdateWantData()
166 SetWantData(want, newWantData, tlv->totalLen + want->dataLength); in UpdateWantData()
170 SetWantData(want, tlv->entity, tlv->totalLen); in UpdateWantData()
/ohos5.0/base/update/updater/services/package/pkg_package/
H A Dpkg_upgradefile.cpp37 if (!((tlv)->length < (fileLen) && (tlv)->length >= (len) && (tlv)->type == (tlvType) && \
644 PkgTlv tlv; in ReadComponents() local
645 tlv.type = ReadLE16(buffer.buffer); in ReadComponents()
656 while (info.srcOffset < tlv.length) { in ReadComponents()
684 tlv.type = ReadLE16(buffer.buffer); in ParsePkgHeaderToTlv()
686 if (tlv.type == TLV_TYPE_FOR_SHA384) { in ParsePkgHeaderToTlv()
722 PkgTlv tlv; in ReadUpgradePkgHeader() local
731 ParsePkgHeaderToTlv(buffer, currLen, tlv); in ReadUpgradePkgHeader()
741 realLen = currLen + tlv.length; in ReadUpgradePkgHeader()
751 currLen += tlv.length; in ReadUpgradePkgHeader()
[all …]
/ohos5.0/base/startup/appspawn/test/unittest/app_spawn_standard_test/
H A Dapp_spawn_appmgr_test.cpp459 AppSpawnTlv tlv = {}; in AddRenderTerminationTlv() local
464 int ret = memcpy_s(buffer, bufferLen, &tlv, sizeof(tlv)); in AddRenderTerminationTlv()
466 ret = memcpy_s(buffer + sizeof(tlv), bufferLen - sizeof(tlv), &pid, tlv.tlvLen - sizeof(tlv)); in AddRenderTerminationTlv()
468 currLen += tlv.tlvLen; in AddRenderTerminationTlv()
664 AppSpawnTlvExt tlv = {}; in AddTest001ExtTlv() local
665 tlv.tlvType = TLV_MAX; in AddTest001ExtTlv()
666 int ret = strcpy_s(tlv.tlvName, sizeof(tlv.tlvName), "test-001"); in AddTest001ExtTlv()
669 tlv.tlvLen = sizeof(AppSpawnTlvExt) + APPSPAWN_ALIGN(tlv.dataLen); in AddTest001ExtTlv()
671 ret = memcpy_s(buffer, bufferLen, &tlv, sizeof(tlv)); in AddTest001ExtTlv()
673 ret = memcpy_s(buffer + sizeof(tlv), bufferLen - sizeof(tlv), testData, tlv.dataLen + 1); in AddTest001ExtTlv()
[all …]
/ohos5.0/base/security/device_security_level/baselib/utils/include/
H A Dutils_tlv.h37 uint32_t Serialize(const TlvCommon *tlv, uint32_t tlvCount, uint8_t *buff, uint32_t maxBuffSize, ui…
39 uint32_t Deserialize(const uint8_t *buff, uint32_t buffSize, TlvCommon *tlv, uint32_t maxTlvCount, …
/ohos5.0/drivers/peripheral/user_auth/hdi_service/coauth/src/
H A Dexecutor_message.c364 ExecutorResultInfo *CreateExecutorResultInfo(const Buffer *tlv) in CreateExecutorResultInfo() argument
366 if (!IsBufferValid(tlv)) { in CreateExecutorResultInfo()
371 Uint8Array msg = { tlv->buf, tlv->contentSize }; in CreateExecutorResultInfo()
663 IAM_STATIC ResultCode GetExecutorInfoHal(Uint8Array tlv, ExecutorInfoHal *executorInfo) in GetExecutorInfoHal() argument
665 Attribute *attribute = CreateAttributeFromSerializedMsg(tlv); in GetExecutorInfoHal()
966 ResultCode CreateScheduleInfo(const Buffer *tlv, Uint8Array peerUdid, ScheduleInfoParam *scheduleIn… in CreateScheduleInfo() argument
968 if (!IsBufferValid(tlv) || IS_ARRAY_NULL(peerUdid) || (scheduleInfo == NULL)) { in CreateScheduleInfo()
973 Uint8Array msg = { tlv->buf, tlv->contentSize }; in CreateScheduleInfo()
1027 ResultCode CreateAuthResultInfo(const Buffer *tlv, AuthResultParam *authResultInfo) in CreateAuthResultInfo() argument
1029 if (!IsBufferValid(tlv) || (authResultInfo == NULL)) { in CreateAuthResultInfo()
[all …]
/ohos5.0/base/telephony/core_service/services/sim/src/
H A Dusim_dialling_numbers_service.cpp284 std::shared_ptr<UsimDiallingNumberFile> file, std::shared_ptr<TagService> tlv, int parentTag) in StorePbrDetailInfo() argument
286 if (tlv == nullptr) { in StorePbrDetailInfo()
290 for (int count = 0; tlv->Next(); ++count) { in StorePbrDetailInfo()
291 const int tag = tlv->GetTagCode(); in StorePbrDetailInfo()
300 tlv->GetValue(data); in StorePbrDetailInfo()
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/device_cert_manager/include/
H A Ddcm_asn1.h100 …2_t DcmAsn1InsertValue(struct HksBlob *buf, struct HksAsn1Obj *obj, const struct HksAsn1Blob *tlv);
102 int32_t DcmAsn1WriteFinal(struct HksBlob *final, const struct HksAsn1Blob *tlv);
/ohos5.0/drivers/peripheral/user_auth/hdi_service/user_auth/inc/
H A Duser_auth_funcs.h83 ResultCode GenerateScheduleFunc(const Buffer *tlv, Uint8Array remoteUdid, ScheduleInfoParam *schedu…
84 ResultCode GenerateAuthResultFunc(const Buffer *tlv, AuthResultParam *authResultInfo);
/ohos5.0/foundation/ability/dmsfwk_lite/source/
H A Ddmslite_parser.c165 TlvErrorCode TlvBytesToNode(const uint8_t *byteBuffer, uint16_t bufLength, TlvNode **tlv) in TlvBytesToNode() argument
167 if ((tlv == NULL) || (byteBuffer == NULL)) { in TlvBytesToNode()
224 *tlv = head; in TlvBytesToNode()
/ohos5.0/drivers/peripheral/user_auth/hdi_service/user_auth/src/
H A Duser_auth_funcs.c465 ResultCode GenerateScheduleFunc(const Buffer *tlv, Uint8Array remoteUdid, ScheduleInfoParam *schedu… in GenerateScheduleFunc() argument
467 if (!IsBufferValid(tlv) || IS_ARRAY_NULL(remoteUdid) || (scheduleInfo == NULL)) { in GenerateScheduleFunc()
471 ResultCode result = CreateScheduleInfo(tlv, remoteUdid, scheduleInfo); in GenerateScheduleFunc()
478 ResultCode GenerateAuthResultFunc(const Buffer *tlv, AuthResultParam *authResultInfo) in GenerateAuthResultFunc() argument
480 if (!IsBufferValid(tlv) || (authResultInfo == NULL)) { in GenerateAuthResultFunc()
484 ResultCode result = CreateAuthResultInfo(tlv, authResultInfo); in GenerateAuthResultFunc()
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/service_test/huks_engine/core/src/
H A Dhks_asn1_test.cpp69 struct HksAsn1Blob tlv = { .type = 0, .size = sizeof(tlvData), .data = tlvData }; variable
70 int32_t ret = DcmAsn1InsertValue(&buf, nullptr, &tlv);
/ohos5.0/base/startup/appspawn/modules/native_adapter/
H A Dnative_adapter.cpp57 AppSpawnTlvExt *tlv = (AppSpawnTlvExt *)data; in BuildFdInfoMap() local
58 if (strcmp(tlv->tlvName, MSG_EXT_NAME_APP_FD) != 0) { in BuildFdInfoMap()
/ohos5.0/foundation/distributeddatamgr/pasteboard/framework/innerkits/
H A DBUILD.gn27 "//foundation/distributeddatamgr/pasteboard/framework/tlv",
72 "${pasteboard_root_path}/framework/tlv:pasteboard_tlv",

12