Aktualizr
C++ SOTA Client
directorrepository.cc
1 #include "directorrepository.h"
2 
3 namespace Uptane {
4 
5 void DirectorRepository::resetMeta() {
6  resetRoot();
7  targets = Targets();
8 }
9 
10 bool DirectorRepository::verifyTargets(const std::string& targets_raw) {
11  try {
12  targets = Targets(RepositoryType::Director, Utils::parseJSON(targets_raw), root); // signature verification
13  } catch (const Uptane::Exception& e) {
14  LOG_ERROR << "Signature verification for director targets metadata failed";
15  last_exception = e;
16  return false;
17  }
18  return true;
19 }
20 
21 } // namespace Uptane
Base data types that are used in The Update Framework (TUF), part of UPTANE.