/base/update/updater/test/unittest/updater_binary/ |
D | update_image_block_test.cpp | 63 const string packagePath = "/data/updater/updater/updater_write_miscblock_img.zip"; variable 64 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); 71 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; variable 72 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); 79 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; variable 80 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
|
D | update_processor_unittest.cpp | 74 const string packagePath = "/data/updater/updater/updater_write_misc_img.zip"; variable 75 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); 87 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; variable 88 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName()); 100 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; variable 101 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
|
D | update_partitions_unittest.cpp | 57 const string packagePath = "/data/updater/updater/parts/updaterpart01.zip"; variable 61 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components); 80 const string packagePath = "/data/updater/updater/parts/updaterpart02.zip"; variable 84 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
|
D | updater_binary_unittest.cpp | 73 int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) const in BuildFileDigest() 77 … int32_t ret = pkgManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in BuildFileDigest() 79 LOG(ERROR) << "Create input stream fail " << packagePath; in BuildFileDigest() 159 std::string packagePath = TEST_PATH_TO; in CreatePackageBin() local 160 packagePath += testPackageName; in CreatePackageBin() 161 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageBin()
|
/base/update/updater/test/unittest/updater_test/ |
D | updater_unittest.cpp | 72 std::string packagePath = "/data/updater/updater/updater_without_updater_binary.zip"; variable 76 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature); 79 packagePath = "/data/updater/updater/updater_with_incorrect_binary.zip"; 80 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature); 83 packagePath = "/data/updater/updater/updater.zip"; 85 int32_t ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components); 87 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature); 91 status = StartUpdaterProc(pkgManager, packagePath, 1, maxTemperature); 94 packagePath = "/data/updater/updater/updater_binary_abnormal.zip"; 95 status = StartUpdaterProc(pkgManager, packagePath, 1, maxTemperature);
|
/base/update/updater/test/unittest/script/ |
D | script_unittest.h | 40 int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, in VerifyPackage() argument 45 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath, in LoadPackage() argument 50 int32_t VerifyOtaPackage(const std::string &packagePath) override in VerifyOtaPackage() argument 54 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath, in VerifyBinFile() argument 59 const PkgInfo *GetPackageInfo(const std::string &packagePath) override in GetPackageInfo() argument 94 int32_t LoadPackageWithoutUnPack(const std::string &packagePath, in LoadPackageWithoutUnPack() argument 105 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, in LoadPackageWithStream() argument 122 …int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) overri… in ParseComponents() argument
|
/base/update/updater/interfaces/kits/include/package/ |
D | package.h | 123 int32_t VerifyPackage(const char *packagePath, const char *keyPath, 134 int32_t VerifyPackageWithCallback(const std::string &packagePath, const std::string &keyPath, 146 int32_t ExtraPackageDir(const char *packagePath, const char *keyPath, const char *dir, 158 int32_t ExtraPackageFile(const char *packagePath, const char *keyPath, const char *file,
|
/base/update/updater/services/package/pkg_manager/ |
D | pkg_manager_impl.h | 46 …int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, const std::strin… 49 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath, 56 const PkgInfo *GetPackageInfo(const std::string &packagePath) override; 64 …int32_t LoadPackageWithoutUnPack(const std::string &packagePath, std::vector<std::string> &fileIds… 66 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, 78 int32_t VerifyOtaPackage(const std::string &packagePath) override; 80 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath, 96 …int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) overri… 107 …int32_t LoadPackage(const std::string &packagePath, std::vector<std::string> &fileIds, PkgFile::Pk… 109 int32_t LoadPackageWithStream(const std::string &packagePath,
|
D | pkg_managerImpl.cpp | 236 int32_t PkgManagerImpl::LoadPackageWithoutUnPack(const std::string &packagePath, in LoadPackageWithoutUnPack() argument 239 PkgFile::PkgType pkgType = GetPkgTypeByName(packagePath); in LoadPackageWithoutUnPack() 240 int32_t ret = LoadPackage(packagePath, fileIds, pkgType); in LoadPackageWithoutUnPack() 242 PKG_LOGE("Parse %s fail ", packagePath.c_str()); in LoadPackageWithoutUnPack() 275 int32_t PkgManagerImpl::LoadPackage(const std::string &packagePath, const std::string &keyPath, in LoadPackage() argument 278 if (access(packagePath.c_str(), 0) != 0) { in LoadPackage() 288 if (iter != nullptr && iter->GetPkgStream()->GetFileName().compare(packagePath) == 0) { in LoadPackage() 292 PkgFile::PkgType pkgType = GetPkgTypeByName(packagePath); in LoadPackage() 295 int32_t ret = LoadPackage(packagePath, fileIds, pkgType); in LoadPackage() 299 PKG_LOGE("Parse %s fail ", packagePath.c_str()); in LoadPackage() [all …]
|
/base/update/updater/test/unittest/package/ |
D | pkg_package_unittest.cpp | 78 std::string packagePath = TEST_PATH_TO; in TestPkgFile() local 79 packagePath += testPackageName; in TestPkgFile() 80 … int ret = pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestPkgFile() 100 std::string packagePath = TEST_PATH_TO; in TestPkgFileInvalid() local 101 packagePath += testPackageName; in TestPkgFileInvalid() 102 … int ret = pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestPkgFileInvalid() 119 std::string packagePath = TEST_PATH_TO; in TestBigZipEntry() local 121 packagePath += testPackageName; in TestBigZipEntry() 122 pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestBigZipEntry() 192 std::string packagePath = testPackagePath + "test_package.zip"; in TestUpdaterPreProcess() local [all …]
|
D | pkg_verify_unittest.cpp | 58 std::string packagePath = "invalid_path"; in TestExtraPackageFile() local 62 ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), outPath.c_str()); in TestExtraPackageFile() 65 packagePath = testPackagePath + "test_package.zip"; in TestExtraPackageFile() 68 …ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), testPackagePath.c_str()… in TestExtraPackageFile() 78 std::string packagePath = "invalid_path"; in TestExtraPackageDir() local 81 ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, outPath.c_str()); in TestExtraPackageDir() 84 packagePath = testPackagePath + "test_package.zip"; in TestExtraPackageDir() 86 … ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, testPackagePath.c_str()); in TestExtraPackageDir()
|
D | package_unittest.cpp | 57 std::string packagePath = TEST_PATH_TO + testPackageName; in TestInvalidCreatePackage() local 59 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage() 64 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage() 69 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage() 74 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage() 79 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage() 118 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local 119 packagePath += testPackageName; in TestPackagePack() 120 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), in TestPackagePack()
|
D | pkg_manager_unittest.cpp | 138 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local 139 packagePath += testPackageName; in TestPackagePack() 140 int32_t ret = pkgManager_->CreatePackage(packagePath, "", &pkgInfo.pkgInfo, files); in TestPackagePack() 142 … ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), &pkgInfo.pkgInfo, files); in TestPackagePack() 153 std::string packagePath = TEST_PATH_TO; in TestPackagePackFileNotExist() local 154 packagePath += testPackageName; in TestPackagePackFileNotExist() 158 …int32_t ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), &pkgInfo.pkgInfo, … in TestPackagePackFileNotExist() 167 std::string packagePath = TEST_PATH_TO; in TestPackagePackParamInvalid() local 168 packagePath += testPackageName; in TestPackagePackParamInvalid() 169 … int32_t ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), nullptr, files); in TestPackagePackParamInvalid() [all …]
|
/base/update/updateservice/services/engine/src/ |
D | update_service_local_updater.cpp | 45 int32_t UpdateServiceLocalUpdater::VerifyUpgradePackage(const std::string &packagePath, const std::… in VerifyUpgradePackage() argument 49 int32_t ret = ::VerifyPackageWithCallback(packagePath.c_str(), keyPath.c_str(), in VerifyUpgradePackage() 51 … ENGINE_LOGI("VerifyUpgradePackage %s, %s, %{public}d", packagePath.c_str(), keyPath.c_str(), ret); in VerifyUpgradePackage()
|
/base/update/updater/interfaces/kits/packages/ |
D | package.cpp | 171 int32_t VerifyPackage(const char *packagePath, in VerifyPackage() argument 178 if (packagePath == nullptr || keyPath == nullptr || version == nullptr || manager == nullptr) { in VerifyPackage() 183 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, in VerifyPackage() 189 int32_t VerifyPackageWithCallback(const std::string &packagePath, in VerifyPackageWithCallback() argument 192 if (packagePath.empty() || keyPath.empty() || cb == nullptr) { in VerifyPackageWithCallback() 199 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, cb); in VerifyPackageWithCallback() 207 int32_t ExtraPackageDir(const char *packagePath, [[maybe_unused]] const char *keyPath, const char *… in ExtraPackageDir() argument 211 if (packagePath == nullptr || outPath == nullptr || manager == nullptr) { in ExtraPackageDir() 217 int32_t ret = manager->LoadPackageWithoutUnPack(std::string(packagePath), components); in ExtraPackageDir() 242 int32_t ExtraPackageFile(const char *packagePath, [[maybe_unused]] const char *keyPath, const char … in ExtraPackageFile() argument [all …]
|
/base/update/updater/services/updater_binary/ |
D | main.cpp | 46 std::string packagePath = argv[0]; in main() local 47 return ProcessUpdater(retry, pipeFd, packagePath, Utils::GetCertName()); in main()
|
/base/update/updater/test/unittest/flow_update/update_bin/ |
D | bin_flow_update_unittest.cpp | 45 std::string packagePath = "/data/updater/package/updater_flow.zip"; in TestBinFlowUpdater() local 53 int32_t ret = pkgManager->LoadPackage(packagePath, Utils::GetCertName(), components); in TestBinFlowUpdater() 60 ret = Updater::ExecUpdate(pkgManager, false, packagePath, in TestBinFlowUpdater()
|
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/ |
D | UpdaterStartUpdaterProc_fuzzer.cpp | 49 static int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument 54 …int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Rea… in BuildFileDigest() 56 PKG_LOGE("Create input stream fail %s", packagePath.c_str()); in BuildFileDigest() 141 std::string packagePath = TEST_PATH_TO; in CreatePackageZip() local 142 packagePath += testPackageName; in CreatePackageZip() 143 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageZip()
|
/base/update/updater/services/include/package/ |
D | pkg_manager.h | 247 virtual int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, 258 virtual int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath, 261 virtual int32_t VerifyOtaPackage(const std::string &packagePath) = 0; 263 virtual int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath, 272 virtual const PkgInfo *GetPackageInfo(const std::string &packagePath) = 0; 345 virtual int32_t LoadPackageWithoutUnPack(const std::string &packagePath, 348 … virtual int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, 359 …virtual int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName…
|
/base/update/sys_installer/test/fuzztest/ |
D | sys_installer_fuzzer.cpp | 42 static int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument 47 …int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Rea… in BuildFileDigest() 131 std::string packagePath = TEST_PATH_TO; in CreatePackageZip() local 132 packagePath += testPackageName; in CreatePackageZip() 133 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageZip()
|
/base/update/updater/services/include/updater/ |
D | updater.h | 71 int32_t ExtractUpdaterBinary(Hpackage::PkgManager::PkgManagerPtr manager, std::string &packagePath, 89 UpdaterStatus IsSpaceCapacitySufficient(const std::vector<std::string> &packagePath); 91 std::vector<uint64_t> GetStashSizeList(const std::vector<std::string> &packagePath);
|
/base/update/updater/test/fuzztest/extractandexecutescript_fuzzer/ |
D | extractandexecutescript_fuzzer.cpp | 181 int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument 184 …int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Rea… in BuildFileDigest() 186 PKG_LOGE("Create input stream fail %s", packagePath.c_str()); in BuildFileDigest() 269 std::string packagePath = TEST_PATH_TO; in CreatePackageBin() local 270 packagePath += testPackageName; in CreatePackageBin() 271 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageBin()
|
/base/update/updater/test/unittest/test_data/applypatch/ |
D | TestDecompressGzip.new.gz |
|
/base/update/updater/test/unittest/service_test/ |
D | updater_service_unittest.cpp | 240 std::vector<std::string> packagePath; variable 241 UpdaterStatus status = IsSpaceCapacitySufficient(packagePath); 243 packagePath.push_back("/data/updater/updater/updater_full.zip"); 244 status = IsSpaceCapacitySufficient(packagePath); 246 packagePath.push_back("xxx"); 248 status = IsSpaceCapacitySufficient(packagePath);
|
/base/update/updater/services/ |
D | updater.cpp | 61 int32_t ExtractUpdaterBinary(PkgManager::PkgManagerPtr manager, std::string &packagePath, in ExtractUpdaterBinary() argument 79 …if (!verifier.LoadHashDataAndPkcs7(packagePath) || !verifier.VerifyHashData(updaterBinary, outStre… in ExtractUpdaterBinary() 103 UpdaterStatus IsSpaceCapacitySufficient(const std::vector<std::string> &packagePath) in IsSpaceCapacitySufficient() argument 106 std::vector<uint64_t> stashSizeList = GetStashSizeList(packagePath); in IsSpaceCapacitySufficient() 114 uint64_t maxLogSpace = MAX_LOG_SPACE * packagePath.size(); in IsSpaceCapacitySufficient() 125 std::vector<uint64_t> GetStashSizeList(const std::vector<std::string> &packagePath) in GetStashSizeList() argument 129 for (auto path : packagePath) { in GetStashSizeList()
|