diff --git a/src/aktualizr_repo/image_repo.cc b/src/aktualizr_repo/image_repo.cc index 9ee6821246..565702a2bb 100644 --- a/src/aktualizr_repo/image_repo.cc +++ b/src/aktualizr_repo/image_repo.cc @@ -52,7 +52,7 @@ void ImageRepo::addImage(const std::string &name, const Json::Value &target) { Utils::jsonToCanonicalStr(signTuf(Uptane::Role::Timestamp(), timestamp))); } -void ImageRepo::addImage(const std::string &name, const Uptane::Hash &hash, const uint64_t length) { +void ImageRepo::addCustomImage(const std::string &name, const Uptane::Hash &hash, const uint64_t length) { Json::Value target; target["length"] = Json::UInt(length); if (hash.type() == Uptane::Hash::Type::kSha256) { diff --git a/src/aktualizr_repo/image_repo.h b/src/aktualizr_repo/image_repo.h index cd133043ce..97108cee89 100644 --- a/src/aktualizr_repo/image_repo.h +++ b/src/aktualizr_repo/image_repo.h @@ -8,7 +8,7 @@ class ImageRepo : public Repo { ImageRepo(boost::filesystem::path path, const std::string &expires, std::string correlation_id) : Repo(Uptane::RepositoryType::Image(), std::move(path), expires, std::move(correlation_id)) {} void addImage(const boost::filesystem::path &image_path); - void addImage(const std::string &name, const Uptane::Hash &hash, uint64_t length); + void addCustomImage(const std::string &name, const Uptane::Hash &hash, uint64_t length); private: void addImage(const std::string &name, const Json::Value &target); diff --git a/src/aktualizr_repo/main.cc b/src/aktualizr_repo/main.cc index f8721cea10..96f1e828cc 100644 --- a/src/aktualizr_repo/main.cc +++ b/src/aktualizr_repo/main.cc @@ -77,7 +77,7 @@ int main(int argc, char **argv) { } else { hash = std_::make_unique(Uptane::Hash::Type::kSha512, vm["targetsha512"].as()); } - repo.addImage(vm["targetname"].as(), *hash, vm["targetlength"].as()); + repo.addCustomImage(vm["targetname"].as(), *hash, vm["targetlength"].as()); } else { std::cerr << "You shoud provide --filename or --targetname, --targetsha256 or --targetsha512, and --targetlength\n"; diff --git a/src/aktualizr_repo/uptane_repo.cc b/src/aktualizr_repo/uptane_repo.cc index 1c3e7e915c..79b159b104 100644 --- a/src/aktualizr_repo/uptane_repo.cc +++ b/src/aktualizr_repo/uptane_repo.cc @@ -18,8 +18,8 @@ void UptaneRepo::addTarget(const std::string &target_name, const std::string &ha director_repo_.addTarget(target_name, target, hardware_id, ecu_serial); } void UptaneRepo::addImage(const boost::filesystem::path &image_path) { image_repo_.addImage(image_path); } -void UptaneRepo::addImage(const std::string &name, const Uptane::Hash &hash, uint64_t length) { - image_repo_.addImage(name, hash, length); +void UptaneRepo::addCustomImage(const std::string &name, const Uptane::Hash &hash, uint64_t length) { + image_repo_.addCustomImage(name, hash, length); } void UptaneRepo::signTargets() { director_repo_.signTargets(); } diff --git a/src/aktualizr_repo/uptane_repo.h b/src/aktualizr_repo/uptane_repo.h index d3f3e7a379..4f239edd13 100644 --- a/src/aktualizr_repo/uptane_repo.h +++ b/src/aktualizr_repo/uptane_repo.h @@ -10,7 +10,7 @@ class UptaneRepo { void generateRepo(KeyType key_type = KeyType::kRSA2048); void addTarget(const std::string &target_name, const std::string &hardware_id, const std::string &ecu_serial); void addImage(const boost::filesystem::path &image_path); - void addImage(const std::string &name, const Uptane::Hash &hash, uint64_t length); + void addCustomImage(const std::string &name, const Uptane::Hash &hash, uint64_t length); void signTargets(); void emptyTargets(); void oldTargets();