1 #ifndef IMAGES_REPOSITORY_H_
2 #define IMAGES_REPOSITORY_H_
7 #include "uptanerepository.h"
11 constexpr
int kDelegationsMaxDepth = 5;
19 bool verifyTargets(
const std::string& targets_raw);
20 bool targetsExpired() {
return targets->isExpired(TimeStamp::Now()); }
22 bool verifyTimestamp(
const std::string& timestamp_raw);
23 bool timestampExpired() {
return timestamp.isExpired(TimeStamp::Now()); }
25 bool verifySnapshot(
const std::string& snapshot_raw);
26 bool snapshotExpired() {
return snapshot.isExpired(TimeStamp::Now()); }
27 int64_t snapshotSize() {
return timestamp.snapshot_size(); }
29 Exception getLastException()
const {
return last_exception; }
31 static std::shared_ptr<Uptane::Targets> verifyDelegation(
const std::string& delegation_raw,
const Uptane::Role& role,
33 std::shared_ptr<const Uptane::Targets> getTargets()
const {
return targets; }
35 bool verifyRoleHashes(
const std::string& role_data,
const Uptane::Role& role)
const;
46 std::shared_ptr<Uptane::Targets> targets;
55 #endif // IMAGES_REPOSITORY_H