/base/update/updater/test/unittest/updater_binary/ |
D | updater_binary_unittest.cpp | 131 UpgradePkgInfoExt pkgInfo; in CreatePackageBin() local 133 pkgInfo.softwareVersion = strdup("100.100.100.100"); in CreatePackageBin() 134 pkgInfo.date = strdup("2021-02-02"); in CreatePackageBin() 135 pkgInfo.time = strdup("21:23:49"); in CreatePackageBin() 136 pkgInfo.productUpdateId = strdup("555.555.100.555"); in CreatePackageBin() 139 pkgInfo.entryCount = testFileNames_.size() + fileNameIndex; in CreatePackageBin() 140 pkgInfo.updateFileVersion = updateFileVersion; in CreatePackageBin() 141 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in CreatePackageBin() 142 pkgInfo.signMethod = PKG_SIGN_METHOD_RSA; in CreatePackageBin() 143 pkgInfo.pkgType = PKG_PACK_TYPE_UPGRADE; in CreatePackageBin() [all …]
|
/base/update/sys_installer/test/fuzztest/ |
D | sys_installer_fuzzer.cpp | 102 UpgradePkgInfoExt pkgInfo; in CreatePackageZip() local 103 pkgInfo.softwareVersion = strdup("100.100.100.100"); in CreatePackageZip() 104 pkgInfo.date = strdup("2021-07-16"); in CreatePackageZip() 105 pkgInfo.time = strdup("13:14:00"); in CreatePackageZip() 106 pkgInfo.productUpdateId = strdup("555.555.100.555"); in CreatePackageZip() 107 pkgInfo.entryCount = fstabFile.size(); in CreatePackageZip() 108 pkgInfo.updateFileVersion = updateFileVersion; in CreatePackageZip() 109 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in CreatePackageZip() 110 pkgInfo.signMethod = PKG_SIGN_METHOD_RSA; in CreatePackageZip() 111 pkgInfo.pkgType = PKG_PACK_TYPE_ZIP; in CreatePackageZip() [all …]
|
/base/update/updater/test/unittest/package/ |
D | package_unittest.cpp | 88 UpgradePkgInfoExt pkgInfo; in TestPackagePack() local 89 pkgInfo.softwareVersion = strdup("100.100.100.100"); in TestPackagePack() 90 pkgInfo.date = strdup("2021-02-02"); in TestPackagePack() 91 pkgInfo.time = strdup("21:23:49"); in TestPackagePack() 92 pkgInfo.productUpdateId = strdup("555.555.100.555"); in TestPackagePack() 93 pkgInfo.entryCount = testFileNames_.size(); in TestPackagePack() 94 pkgInfo.digestMethod = type; in TestPackagePack() 95 pkgInfo.signMethod = PKG_SIGN_METHOD_RSA; in TestPackagePack() 96 pkgInfo.pkgType = PKG_PACK_TYPE_UPGRADE; in TestPackagePack() 97 pkgInfo.updateFileVersion = updateFileVersion; in TestPackagePack() [all …]
|
D | pkg_manager_unittest.cpp | 97 …void GetUpgradePkgInfo(UpgradePkgInfo &pkgInfo, std::vector<std::pair<std::string, ComponentInfo>>… in GetUpgradePkgInfo() argument 99 pkgInfo.softwareVersion = "100.100.100.100"; in GetUpgradePkgInfo() 100 pkgInfo.date = "2021-02-02"; in GetUpgradePkgInfo() 101 pkgInfo.time = "21:23:49"; in GetUpgradePkgInfo() 102 pkgInfo.productUpdateId = "555.555.100.555"; in GetUpgradePkgInfo() 103 pkgInfo.pkgInfo.entryCount = testFileNames_.size(); in GetUpgradePkgInfo() 104 pkgInfo.pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in GetUpgradePkgInfo() 105 pkgInfo.pkgInfo.signMethod = PKG_SIGN_METHOD_RSA; in GetUpgradePkgInfo() 106 pkgInfo.pkgInfo.pkgType = PKG_PACK_TYPE_UPGRADE; in GetUpgradePkgInfo() 107 pkgInfo.updateFileVersion = TEST_FILE_VERSION; in GetUpgradePkgInfo() [all …]
|
D | pkg_test.h | 169 PkgInfo pkgInfo; in CreateZipPackage() local 170 pkgInfo.signMethod = PKG_SIGN_METHOD_RSA; in CreateZipPackage() 171 pkgInfo.digestMethod = digestMethod; in CreateZipPackage() 172 pkgInfo.pkgType = PKG_PACK_TYPE_ZIP; in CreateZipPackage() 173 …ret = pkgManager->CreatePackage(packageName, GetTestPrivateKeyName(digestMethod), &pkgInfo, files); in CreateZipPackage()
|
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/ |
D | UpdaterStartUpdaterProc_fuzzer.cpp | 112 UpgradePkgInfoExt pkgInfo; in CreatePackageZip() local 113 pkgInfo.softwareVersion = strdup("100.100.100.100"); in CreatePackageZip() 114 pkgInfo.date = strdup("2021-07-16"); in CreatePackageZip() 115 pkgInfo.time = strdup("13:14:00"); in CreatePackageZip() 116 pkgInfo.productUpdateId = strdup("555.555.100.555"); in CreatePackageZip() 117 pkgInfo.entryCount = fstabFile.size(); in CreatePackageZip() 118 pkgInfo.updateFileVersion = updateFileVersion; in CreatePackageZip() 119 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in CreatePackageZip() 120 pkgInfo.signMethod = PKG_SIGN_METHOD_RSA; in CreatePackageZip() 121 pkgInfo.pkgType = PKG_PACK_TYPE_ZIP; in CreatePackageZip() [all …]
|
/base/update/updater/test/fuzztest/extractandexecutescript_fuzzer/ |
D | extractandexecutescript_fuzzer.cpp | 240 UpgradePkgInfoExt pkgInfo; in CreatePackageBin() local 241 pkgInfo.softwareVersion = strdup("100.100.100.100"); in CreatePackageBin() 242 pkgInfo.date = strdup("2021-02-02"); in CreatePackageBin() 243 pkgInfo.time = strdup("21:23:49"); in CreatePackageBin() 244 pkgInfo.productUpdateId = strdup("555.555.100.555"); in CreatePackageBin() 245 pkgInfo.entryCount = inputFile.size(); in CreatePackageBin() 246 pkgInfo.updateFileVersion = updateFileVersion; in CreatePackageBin() 247 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in CreatePackageBin() 248 pkgInfo.signMethod = PKG_SIGN_METHOD_RSA; in CreatePackageBin() 249 pkgInfo.pkgType = PKG_PACK_TYPE_UPGRADE; in CreatePackageBin() [all …]
|
/base/update/updater/interfaces/kits/packages/ |
D | package.cpp | 50 upgradePackageInfo->pkgInfo.digestMethod = pkgInfoExt->digestMethod; in GetUpgradePkgInfo() 51 upgradePackageInfo->pkgInfo.signMethod = pkgInfoExt->signMethod; in GetUpgradePkgInfo() 52 upgradePackageInfo->pkgInfo.entryCount = pkgInfoExt->entryCount; in GetUpgradePkgInfo() 53 upgradePackageInfo->pkgInfo.pkgType = PKG_PACK_TYPE_UPGRADE; in GetUpgradePkgInfo() 77 int32_t GetZipPkgInfo(PkgManager::PkgInfoPtr pkgInfo, in GetZipPkgInfo() argument 82 pkgInfo->signMethod = pkgInfoExt->signMethod; in GetZipPkgInfo() 83 pkgInfo->digestMethod = pkgInfoExt->digestMethod; in GetZipPkgInfo() 84 pkgInfo->entryCount = pkgInfoExt->entryCount; in GetZipPkgInfo() 85 pkgInfo->pkgType = pkgInfoExt->pkgType; in GetZipPkgInfo() 87 for (uint32_t i = 0; i < pkgInfo->entryCount; i++) { in GetZipPkgInfo() [all …]
|
/base/update/updater/services/flow_update/update_bin/ |
D | bin_flow_update.cpp | 114 const PkgInfo *pkgInfo = pkgManager_->GetPackageInfo(UPDATE_BIN_FILE); in UpdateBinHead() local 115 if (pkgInfo == nullptr || pkgInfo->updateFileHeadLen == 0 || len < pkgInfo->updateFileHeadLen) { in UpdateBinHead() 120 if (len > pkgInfo->updateFileHeadLen && in UpdateBinHead() 121 …memmove_s(data, len, data + pkgInfo->updateFileHeadLen, len - pkgInfo->updateFileHeadLen) != EOK) { in UpdateBinHead() 126 len -= pkgInfo->updateFileHeadLen; in UpdateBinHead()
|
/base/update/updater/services/package/pkg_package/ |
D | pkg_upgradefile.cpp | 87 return DigestAlgorithm::GetDigestLen(pkgInfo_.pkgInfo.digestMethod); in GetDigestLen() 96 if (pkgEntryMapId_.size() >= pkgInfo_.pkgInfo.entryCount) { in GetEntryOffset() 105 dataOffset = UPGRADE_FILE_HEADER_LEN + pkgInfo_.pkgInfo.entryCount * sizeof(UpgradeCompInfo); in GetEntryOffset() 171 …sizeof(UpgradePkgTime) + pkgInfo_.pkgInfo.entryCount * sizeof(UpgradeCompInfo) + UPGRADE_RESERVE_L… in CheckPackageHeader() 195 offset += pkgInfo_.pkgInfo.entryCount * sizeof(UpgradeCompInfo); in WriteBuffer() 247 …WriteLE16(buffer.data() + offset + sizeof(uint16_t), pkgInfo_.pkgInfo.entryCount * sizeof(UpgradeC… in SavePackage() 396 if (pkgInfo_.pkgInfo.digestMethod == PKG_DIGEST_TYPE_SHA384) { in ReadPackageInfo() 469 pkgInfo_.pkgInfo.updateFileHeadLen = parsedLen; in LoadPackage() 558 ret = verifier(&pkgInfo_.pkgInfo, digest.data, signData); in Verify() 573 int ret = verifier(&pkgInfo_.pkgInfo, digest.data, signData); in VerifyHeader() [all …]
|
D | pkg_upgradefile.h | 131 return &pkgInfo_.pkgInfo; in GetPkgInfo()
|
/base/update/updater/interfaces/kits/include/package/ |
D | package.h | 110 int32_t CreatePackage(const UpgradePkgInfoExt *pkgInfo, ComponentInfoExt comp[],
|
/base/update/updater/services/include/package/ |
D | pkg_info_utils.h | 90 PkgInfo pkgInfo; member
|
/base/update/updater/utils/ |
D | utils.cpp | 411 PkgInfo pkgInfo; in CompressLogs() local 412 pkgInfo.signMethod = PKG_SIGN_METHOD_NONE; in CompressLogs() 413 pkgInfo.digestMethod = PKG_SIGN_METHOD_NONE; in CompressLogs() 414 pkgInfo.pkgType = PKG_PACK_TYPE_ZIP; in CompressLogs() 429 int32_t ret = pkgManager->CreatePackage(pkgName, GetCertName(), &pkgInfo, files); in CompressLogs()
|