Home
last modified time | relevance | path

Searched refs:hashtree_file (Results 1 – 5 of 5) sorted by relevance

/system/apex/apexd/
Dapexd_verity_test.cpp54 auto hashtree_file = StringPrintf("%s/hashtree", td.path); in TEST() local
55 auto status = PrepareHashTree(*apex, *verity_data, hashtree_file); in TEST()
60 ASSERT_TRUE(ReadFileToString(hashtree_file, &first_hashtree)) in TEST()
61 << "Failed to read " << hashtree_file; in TEST()
65 status = PrepareHashTree(*apex, *verity_data, hashtree_file); in TEST()
70 ASSERT_TRUE(ReadFileToString(hashtree_file, &second_hashtree)) in TEST()
71 << "Failed to read " << hashtree_file; in TEST()
75 << hashtree_file << " was regenerated"; in TEST()
86 auto hashtree_file = StringPrintf("%s/hashtree", td.path); in TEST() local
87 auto status = PrepareHashTree(*apex, *verity_data, hashtree_file); in TEST()
[all …]
Dapexd_verity.cpp62 const std::string& hashtree_file) { in GenerateHashTree() argument
114 hashtree_file.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0600))); in GenerateHashTree()
116 return Error() << "Failed to write hashtree to " << hashtree_file; in GenerateHashTree()
121 Result<std::string> CalculateRootDigest(const std::string& hashtree_file, in CalculateRootDigest() argument
124 TEMP_FAILURE_RETRY(open(hashtree_file.c_str(), O_RDONLY | O_CLOEXEC))); in CalculateRootDigest()
126 return ErrnoError() << "Failed to open " << hashtree_file; in CalculateRootDigest()
133 << hashtree_file; in CalculateRootDigest()
146 return Error() << "Failed to calculate digest of " << hashtree_file; in CalculateRootDigest()
157 const std::string& hashtree_file) { in PrepareHashTree() argument
162 if (auto st = CreateDirIfNeeded(Dirname(hashtree_file), 0700); !st.ok()) { in PrepareHashTree()
[all …]
Dapexd_verity.h36 const std::string& hashtree_file);
Dapexd.cpp426 const std::string& hashtree_file, in MountPackageImpl() argument
511 if (auto st = PrepareHashTree(apex, *verity_data, hashtree_file); in MountPackageImpl()
515 auto create_loop_status = loop::CreateLoopDevice(hashtree_file, 0, 0); in MountPackageImpl()
597 std::string hashtree_file = GetHashTreeFileName(apex, /* is_new = */ true); in VerifyAndTempMountPackage() local
598 if (access(hashtree_file.c_str(), F_OK) == 0) { in VerifyAndTempMountPackage()
599 LOG(DEBUG) << hashtree_file << " already exists. Deleting it"; in VerifyAndTempMountPackage()
600 if (TEMP_FAILURE_RETRY(unlink(hashtree_file.c_str())) != 0) { in VerifyAndTempMountPackage()
601 return ErrnoError() << "Failed to unlink " << hashtree_file; in VerifyAndTempMountPackage()
605 MountPackageImpl(apex, mount_point, temp_device_name, hashtree_file, in VerifyAndTempMountPackage()
608 LOG(DEBUG) << "Cleaning up " << hashtree_file; in VerifyAndTempMountPackage()
[all …]
Dapexservice_test.cpp2932 std::string hashtree_file = std::string(kApexHashTreeDir) + "/" + in TEST_F() local
2935 ASSERT_FALSE(RegularFileExists(hashtree_file)); in TEST_F()