1 #ifndef IMAGE_REPOSITORY_H_
2 #define IMAGE_REPOSITORY_H_
7 #include "uptanerepository.h"
11 constexpr
int kDelegationsMaxDepth = 5;
19 void verifyTargets(
const std::string& targets_raw,
bool prefetch);
21 void verifyTimestamp(
const std::string& timestamp_raw);
23 void verifySnapshot(
const std::string& snapshot_raw,
bool prefetch);
25 static std::shared_ptr<Uptane::Targets> verifyDelegation(
const std::string& delegation_raw,
const Uptane::Role& role,
27 std::shared_ptr<const Uptane::Targets> getTargets()
const {
return targets; }
29 void verifyRoleHashes(
const std::string& role_data,
const Uptane::Role& role,
bool prefetch)
const;
37 void checkTimestampExpired();
38 void checkSnapshotExpired();
39 int64_t snapshotSize()
const {
return timestamp.snapshot_size(); }
42 void checkTargetsExpired();
44 std::shared_ptr<Uptane::Targets> targets;
51 #endif // IMAGE_REPOSITORY_H_