Lines Matching refs:descriptor
372 static std::string GetHashAlgorithm(const AvbHashtreeDescriptor &descriptor) { in GetHashAlgorithm() argument
373 return std::string(reinterpret_cast<const char *>(descriptor.hash_algorithm)); in GetHashAlgorithm()
377 static std::string GetHashAlgorithm(const AvbHashDescriptor &descriptor) { in GetHashAlgorithm() argument
378 return std::string(reinterpret_cast<const char *>(descriptor.hash_algorithm)); in GetHashAlgorithm()
460 std::unique_ptr<android::fs_mgr::FsAvbHashtreeDescriptor> descriptor = in GetSystemHashtreeDescriptor() local
462 if (descriptor == nullptr) { in GetSystemHashtreeDescriptor()
467 return descriptor; in GetSystemHashtreeDescriptor()
641 std::unique_ptr<android::fs_mgr::FsAvbHashDescriptor> descriptor = in TEST() local
643 ASSERT_TRUE(descriptor) in TEST()
645 const std::string &salt_str = descriptor->salt; in TEST()
646 const std::string &expected_digest_str = descriptor->digest; in TEST()
651 const std::string hash_algorithm(GetHashAlgorithm(*descriptor)); in TEST()
665 boot_partition_vector.resize(descriptor->image_size); in TEST()
667 descriptor->image_size)) in TEST()
672 boot_partition_vector.data(), descriptor->image_size, in TEST()
673 salt.data(), descriptor->salt_len, out_digest.data())) in TEST()
766 std::unique_ptr<android::fs_mgr::FsAvbHashDescriptor> descriptor = in VerifyGkiComplianceV2Signature() local
768 ASSERT_TRUE(descriptor) in VerifyGkiComplianceV2Signature()
770 ASSERT_EQ(boot_partition_vector.size(), descriptor->image_size); in VerifyGkiComplianceV2Signature()
772 const std::string &salt_str = descriptor->salt; in VerifyGkiComplianceV2Signature()
773 const std::string &expected_digest_str = descriptor->digest; in VerifyGkiComplianceV2Signature()
775 const std::string hash_algorithm(GetHashAlgorithm(*descriptor)); in VerifyGkiComplianceV2Signature()
793 descriptor->salt_len, out_digest.data())) in VerifyGkiComplianceV2Signature()
820 std::unique_ptr<android::fs_mgr::FsAvbHashtreeDescriptor> descriptor = in TEST() local
822 ASSERT_TRUE(descriptor); in TEST()
832 const std::string &salt_str = descriptor->salt; in TEST()
833 const std::string &expected_digest_str = descriptor->root_digest; in TEST()
838 const std::string hash_algorithm(GetHashAlgorithm(*descriptor)); in TEST()
851 ALOGI("image_size = %llu", (unsigned long long)descriptor->image_size); in TEST()
852 ALOGI("data_block_size = %u", descriptor->data_block_size); in TEST()
853 ALOGI("hash_block_size = %u", descriptor->hash_block_size); in TEST()
854 ALOGI("tree_offset = %llu", (unsigned long long)descriptor->tree_offset); in TEST()
855 ALOGI("tree_size = %llu", (unsigned long long)descriptor->tree_size); in TEST()
858 fd, descriptor->image_size, salt, descriptor->data_block_size, in TEST()
859 descriptor->hash_block_size, descriptor->tree_offset, in TEST()
860 descriptor->tree_size, *hasher, expected_digest); in TEST()
894 std::unique_ptr<android::fs_mgr::FsAvbHashtreeDescriptor> descriptor = in TEST() local
896 ASSERT_TRUE(descriptor); in TEST()
927 std::to_string(descriptor->dm_verity_version), in TEST()
930 std::to_string(descriptor->data_block_size), in TEST()
931 std::to_string(descriptor->hash_block_size), in TEST()
932 std::to_string(descriptor->image_size / in TEST()
933 descriptor->data_block_size), // #blocks in TEST()
934 std::to_string(descriptor->image_size / in TEST()
935 descriptor->data_block_size), // hash_start in TEST()
936 GetHashAlgorithm(*descriptor), in TEST()
937 descriptor->root_digest, in TEST()
938 descriptor->salt, in TEST()
993 std::to_string(descriptor->fec_num_roots)); in TEST()
996 std::to_string(descriptor->fec_offset / descriptor->data_block_size)); in TEST()
999 std::to_string(descriptor->fec_offset / descriptor->data_block_size)); in TEST()
1005 static void VerifyHashAlgorithm(const AvbHashtreeDescriptor* descriptor) { in VerifyHashAlgorithm() argument
1008 descriptor, &hashtree_descriptor)) in VerifyHashAlgorithm()
1011 auto partition_name_ptr = reinterpret_cast<const uint8_t*>(descriptor) + in VerifyHashAlgorithm()