Searched refs:hashtree_file (Results 1 – 5 of 5) sorted by relevance
/system/apex/apexd/ |
D | apexd_verity_test.cpp | 56 auto hashtree_file = StringPrintf("%s/hashtree", td.path); in TEST() local 57 auto status = PrepareHashTree(*apex, *verity_data, hashtree_file); in TEST() 62 ASSERT_TRUE(ReadFileToString(hashtree_file, &first_hashtree)) in TEST() 63 << "Failed to read " << hashtree_file; in TEST() 67 status = PrepareHashTree(*apex, *verity_data, hashtree_file); in TEST() 72 ASSERT_TRUE(ReadFileToString(hashtree_file, &second_hashtree)) in TEST() 73 << "Failed to read " << hashtree_file; in TEST() 77 << hashtree_file << " was regenerated"; in TEST() 88 auto hashtree_file = StringPrintf("%s/hashtree", td.path); in TEST() local 89 auto status = PrepareHashTree(*apex, *verity_data, hashtree_file); in TEST() [all …]
|
D | apexd_verity.cpp | 64 const std::string& hashtree_file) { in GenerateHashTree() argument 116 hashtree_file.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0600))); in GenerateHashTree() 118 return Error() << "Failed to write hashtree to " << hashtree_file; in GenerateHashTree() 123 Result<std::string> CalculateRootDigest(const std::string& hashtree_file, in CalculateRootDigest() argument 126 TEMP_FAILURE_RETRY(open(hashtree_file.c_str(), O_RDONLY | O_CLOEXEC))); in CalculateRootDigest() 128 return ErrnoError() << "Failed to open " << hashtree_file; in CalculateRootDigest() 135 << hashtree_file; in CalculateRootDigest() 148 return Error() << "Failed to calculate digest of " << hashtree_file; in CalculateRootDigest() 159 const std::string& hashtree_file) { in PrepareHashTree() argument 164 if (auto st = CreateDirIfNeeded(Dirname(hashtree_file), 0700); !st.ok()) { in PrepareHashTree() [all …]
|
D | apexd_verity.h | 38 const std::string& hashtree_file);
|
D | apexd.cpp | 460 const std::string& hashtree_file, in MountPackageImpl() argument 564 if (auto st = PrepareHashTree(apex, *verity_data, hashtree_file); in MountPackageImpl() 569 loop::CreateAndConfigureLoopDevice(hashtree_file, in MountPackageImpl() 653 std::string hashtree_file = GetHashTreeFileName(apex, /* is_new = */ true); in VerifyAndTempMountPackage() local 654 if (access(hashtree_file.c_str(), F_OK) == 0) { in VerifyAndTempMountPackage() 655 LOG(DEBUG) << hashtree_file << " already exists. Deleting it"; in VerifyAndTempMountPackage() 656 if (TEMP_FAILURE_RETRY(unlink(hashtree_file.c_str())) != 0) { in VerifyAndTempMountPackage() 657 return ErrnoError() << "Failed to unlink " << hashtree_file; in VerifyAndTempMountPackage() 661 MountPackageImpl(apex, mount_point, temp_device_name, hashtree_file, in VerifyAndTempMountPackage() 665 LOG(DEBUG) << "Cleaning up " << hashtree_file; in VerifyAndTempMountPackage() [all …]
|
D | apexservice_test.cpp | 1796 std::string hashtree_file = std::string(kApexHashTreeDir) + "/" + in TEST_F() local 1799 ASSERT_FALSE(RegularFileExists(hashtree_file)); in TEST_F()
|