Home
last modified time | relevance | path

Searched refs:totalLen (Results 1 - 18 of 18) sorted by relevance

/base/tee/tee_client/frameworks/libteec_vendor/
H A Dload_sec_file.c62 long totalLen = 0; in LoadSecFile() local
63 ret = GetImgLen(fp, &totalLen); in LoadSecFile()
68 if (totalLen <= 0 || totalLen > MAX_BUFFER_LEN) { in LoadSecFile()
70 tloge("totalLen is invalid\n"); in LoadSecFile()
75 fileBuffer = malloc(totalLen); in LoadSecFile()
77 tloge("alloc TA file buffer(size=%ld) failed\n", totalLen); in LoadSecFile()
83 long fileSize = (long)fread(fileBuffer, 1, totalLen, fp); in LoadSecFile()
84 if (fileSize != totalLen) { in LoadSecFile()
85 tloge("read ta file failed, read size/total size=%ld/%ld\n", fileSize, totalLen); in LoadSecFile()
[all...]
/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/
H A Dhks_storage_lite.c109 keyInfoHead->totalLen = sizeof(*keyInfoHead); in InitImageBuffer()
159 uint32_t totalLen = keyInfoHead->totalLen; in FreshImageBuffer() local
161 /* check totalLen */ in FreshImageBuffer()
162 if ((totalLen < sizeof(*keyInfoHead)) || (totalLen > MAX_STORAGE_SIZE)) { in FreshImageBuffer()
166 if (totalLen == sizeof(*keyInfoHead)) { in FreshImageBuffer()
172 if (fileLen < (totalLen + offset)) { /* keyfile len at least totalLen + offset */ in FreshImageBuffer()
173 HKS_LOG_E("total Len: %" LOG_PUBLIC "u, invalid file size: %" LOG_PUBLIC "u", totalLen, fileLe in FreshImageBuffer()
295 uint32_t totalLen = sizeof(struct HksStoreHeaderInfo); CleanStorageKeyInfo() local
347 uint32_t totalLen = keyInfoHead->totalLen; GetKeyOffsetByKeyAlias() local
456 GetLenAfterAddKey(const struct HksBlob *keyBlob, uint32_t totalLen, uint32_t *totalLenAdded) GetLenAfterAddKey() argument
820 uint32_t totalLen = keyInfoHead->totalLen; HksStoreGetKeyInfoList() local
[all...]
/base/telephony/core_service/utils/codec/src/
H A Drequest_apdu_build.cpp58 uint32_t totalLen = static_cast<uint32_t>(cmdHex.length() / BYTE_TO_HEX_LEN); in BuildStoreData() local
59 uint32_t totalSubCmds = ((totalLen == 0) ? 1 : ((totalLen + MAX_UINT8 - 1) / MAX_UINT8)); in BuildStoreData()
60 uint32_t leastLen = totalLen; in BuildStoreData()
/base/tee/tee_client/services/teecd/src/
H A Dsecfile_load_agent.c104 long totalLen = 0; in LoadSecFile() local
105 ret = GetImgLen(fp, &totalLen); in LoadSecFile()
110 if (totalLen <= 0 || totalLen > MAX_BUFFER_LEN) { in LoadSecFile()
112 tloge("totalLen is invalid\n"); in LoadSecFile()
117 fileBuffer = malloc((size_t)totalLen); in LoadSecFile()
119 tloge("alloc TA file buffer(size=%ld) failed\n", totalLen); in LoadSecFile()
125 long fileSize = (long)fread(fileBuffer, 1, totalLen, fp); in LoadSecFile()
126 if (fileSize != totalLen) { in LoadSecFile()
127 tloge("read ta file failed, read size/total size=%ld/%ld\n", fileSize, totalLen); in LoadSecFile()
[all...]
/base/security/device_auth/common_lib/interfaces/
H A Dhc_tlv_parser.h230 int32_t totalLen = sizeof(count); \
244 totalLen += elementLen; \
245 if (totalLen >= MAX_TOTOL_LEN) { \
250 return totalLen; \
258 int32_t totalLen = 4; \
267 totalLen += len; \
268 if (totalLen >= MAX_TOTOL_LEN) { \
273 return totalLen; \
280 int32_t totalLen = sizeof(int32_t); \
283 totalLen
[all...]
/base/telephony/core_service/services/sim/src/
H A Dicc_operator_rule.cpp120 int32_t totalLen = INT32_INITVALUE; in CreateFromTLV() local
121 while (strIt != hexStrEnd && totalLen < len) { in CreateFromTLV()
126 totalLen += ruleLen; in CreateFromTLV()
127 TELEPHONY_LOGI("DecodeRule once count:%{public}d ,TAG_ALL_RULE len:%{public}d", totalLen, len); in CreateFromTLV()
152 int32_t totalLen = INT32_INITVALUE; in DecodeTLVTagCertPkg() local
153 while (hexStrBeg != hexStrEnd && totalLen < refDoLen) { in DecodeTLVTagCertPkg()
162 totalLen += length + TLV_SIMPLE_TAG_ONEBYTE_LEN + TLV_SIMPLE_TAG_LENGTH_LEN; in DecodeTLVTagCertPkg()
163 TELEPHONY_LOGI("parse more TLV count:%{public}d , refDoLen:%{public}d", totalLen, refDoLen); in DecodeTLVTagCertPkg()
193 int32_t totalLen = INT32_INITVALUE; in DecodeTLVTagLimits() local
195 while (hexStrBeg != hexStrEnd && totalLen < arDoLe in DecodeTLVTagLimits()
[all...]
/base/hiviewdfx/hilog/services/hilogd/include/
H A Dlog_stats.h105 uint64_t totalLen = 0; in GetTotalLen() local
107 totalLen += i; in GetTotalLen()
109 return totalLen; in GetTotalLen()
/base/security/code_signature/utils/src/
H A Dcert_utils.cpp94 uint32_t totalLen = sizeof(uint32_t); in FormattedCertChain() local
96 totalLen += sizeof(uint32_t) + certChain->certs[i].size; in FormattedCertChain()
99 buffer.Resize(totalLen); in FormattedCertChain()
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/
H A Ddas_task_common.c213 uint32_t totalLen = keyAliasBuff.length; in CombineKeyAlias() local
215 if (memcpy_s(keyAliasBuff.val, totalLen, serviceId->val, serviceId->length) != EOK) { in CombineKeyAlias()
222 if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, keyType->val, keyType->length) != EOK) { in CombineKeyAlias()
229 if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, authId->val, authId->length) != EOK) { in CombineKeyAlias()
256 uint32_t totalLen = keyAliasBuff.length; in CombineKeyAliasForPseudonymPsk() local
260 if (memcpy_s(keyAliasBuff.val, totalLen, serviceType->val, serviceType->length) != EOK) { in CombineKeyAliasForPseudonymPsk()
267 if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, peerAuthId->val, peerAuthId->length) != EOK) { in CombineKeyAliasForPseudonymPsk()
274 if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, keyType->val, keyType->length) != EOK) { in CombineKeyAliasForPseudonymPsk()
/base/security/appverify/interfaces/innerkits/appverify/src/util/
H A Dhap_cert_verify_openssl_utils.cpp258 int32_t totalLen = 0; in WriteX509CrlToStream() local
260 crlFile.seekp(posStart + sizeof(totalLen)); in WriteX509CrlToStream()
267 totalLen += readLen; in WriteX509CrlToStream()
274 crlFile.write(reinterpret_cast<char*>(&totalLen), sizeof(totalLen)); in WriteX509CrlToStream()
/base/security/code_signature/test/unittest/
H A Dcert_chain_verifier_test.cpp159 uint32_t totalLen = sizeof(uint32_t); in FormattedCertChain() local
161 totalLen += sizeof(uint32_t) + certChain[i].GetSize(); in FormattedCertChain()
163 buffer.Resize(totalLen); in FormattedCertChain()
/base/hiviewdfx/hiview/base/utility/
H A Dfile_util.cpp318 uint64_t totalLen = stat(src.c_str(), &st) ? 0 : static_cast<uint64_t>(st.st_size); in CopyFileFast() local
320 while (copyTotalLen < totalLen) { in CopyFileFast()
321 ssize_t copyLen = sendfile(fdOut, fdIn, nullptr, totalLen - copyTotalLen); in CopyFileFast()
329 int ret = copyTotalLen == totalLen ? 0 : -1; in CopyFileFast()
/base/security/device_auth/common_lib/impl/src/
H A Dhc_tlv_parser.c245 uint32_t totalLen = 0; in EncodeTlvStruct() local
252 totalLen += childLen; in EncodeTlvStruct()
254 if (totalLen > MAX_TLV_LENGTH) { in EncodeTlvStruct()
259 return totalLen; in EncodeTlvStruct()
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/
H A Dhiappevent_verify.cpp163 size_t totalLen = 0; in CheckStringLengthOfList() local
168 totalLen += (*it).length(); in CheckStringLengthOfList()
170 if (maxTotalLen > 0 && totalLen > maxTotalLen) { in CheckStringLengthOfList()
/base/security/device_auth/services/identity_manager/src/
H A Dcredential_operator.c76 uint32_t totalLen = keyAliasBuff.length; in CombineKeyAlias() local
78 if (memcpy_s(keyAliasBuff.val, totalLen, serviceId->val, serviceId->length) != EOK) { in CombineKeyAlias()
84 if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, keyType->val, keyType->length) != EOK) { in CombineKeyAlias()
90 if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, authId->val, authId->length) != EOK) { in CombineKeyAlias()
/base/security/huks/interfaces/inner_api/huks_standard/main/include/
H A Dhks_type.h300 uint32_t totalLen; /* key buffer total len */ member
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
H A Dhks_keyblob_lite.c464 uint32_t totalLen = sizeof(struct HksStoreKeyInfo) + HKS_MAX_KEY_ALIAS_LEN + HKS_MAX_KEY_AUTH_ID_LEN + in HksBuildKeyBlob() local
466 ret = HksBlobInit(&tmpOut, totalLen); in HksBuildKeyBlob()
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/
H A Dpake_v1_protocol_task_common.c431 uint32_t totalLen = combinedChallengeBuff->length; in CombinePseudonymChallenge() local
433 if (memcpy_s(combinedChallengeBuff->val, totalLen, pseudonymChallengeBuff->val, in CombinePseudonymChallenge()
440 if (memcpy_s(combinedChallengeBuff->val + usedLen, totalLen - usedLen, nextPseudonymChallengeBuff->val, in CombinePseudonymChallenge()

Completed in 14 milliseconds