Home
last modified time | relevance | path

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

/system/apex/apexd/
Dapexd_verity_test.cpp56 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()
89 auto hashtree_file = StringPrintf("%s/hashtree", td.path); in TEST() local
90 auto status = PrepareHashTree(*apex, *verity_data, hashtree_file); in TEST()
[all …]
Dapexd_verity.cpp61 const std::string& hashtree_file) { in GenerateHashTree() argument
110 hashtree_file.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0600))); in GenerateHashTree()
112 return Error() << "Failed to write hashtree to " << hashtree_file; in GenerateHashTree()
117 Result<std::string> CalculateRootDigest(const std::string& hashtree_file, in CalculateRootDigest() argument
120 TEMP_FAILURE_RETRY(open(hashtree_file.c_str(), O_RDONLY | O_CLOEXEC))); in CalculateRootDigest()
122 return ErrnoError() << "Failed to open " << hashtree_file; in CalculateRootDigest()
129 << hashtree_file; in CalculateRootDigest()
142 return Error() << "Failed to calculate digest of " << hashtree_file; in CalculateRootDigest()
153 const std::string& hashtree_file) { in PrepareHashTree() argument
158 auto exists = PathExists(hashtree_file); in PrepareHashTree()
[all …]
Dapexd_verity.h36 const std::string& hashtree_file);
Dapexd.cpp363 const std::string& hashtree_file, in MountPackageImpl() argument
428 if (auto st = PrepareHashTree(apex, *verityData, hashtree_file); in MountPackageImpl()
432 auto create_loop_status = loop::createLoopDevice(hashtree_file, 0, 0); in MountPackageImpl()
508 std::string hashtree_file = GetHashTreeFileName(apex, /* is_new = */ true); in VerifyAndTempMountPackage() local
509 if (access(hashtree_file.c_str(), F_OK) == 0) { in VerifyAndTempMountPackage()
510 LOG(DEBUG) << hashtree_file << " already exists. Deleting it"; in VerifyAndTempMountPackage()
511 if (TEMP_FAILURE_RETRY(unlink(hashtree_file.c_str())) != 0) { in VerifyAndTempMountPackage()
512 return ErrnoError() << "Failed to unlink " << hashtree_file; in VerifyAndTempMountPackage()
516 hashtree_file, /* verifyImage = */ true); in VerifyAndTempMountPackage()
518 LOG(DEBUG) << "Cleaning up " << hashtree_file; in VerifyAndTempMountPackage()
[all …]
Dapexservice_test.cpp2826 std::string hashtree_file = std::string(kApexHashTreeDir) + "/" + in TEST_F() local
2829 ASSERT_FALSE(RegularFileExists(hashtree_file)); in TEST_F()