Aktualizr
C++ SOTA Client
manifest.h
1 #ifndef AKTUALIZR_UPTANE_MANIFEST_H
2 #define AKTUALIZR_UPTANE_MANIFEST_H
3 
4 #include <memory>
5 
6 #include "json/json.h"
7 #include "libaktualizr/types.h"
8 
9 class KeyManager;
10 
11 namespace Uptane {
12 
14  public:
15  using Ptr = std::shared_ptr<ManifestIssuer>;
16 
17  public:
18  ManifestIssuer(std::shared_ptr<KeyManager> &key_mngr, Uptane::EcuSerial ecu_serial)
19  : ecu_serial_(std::move(ecu_serial)), key_mngr_(key_mngr) {}
20 
21  static Manifest assembleManifest(const InstalledImageInfo &installed_image_info, const Uptane::EcuSerial &ecu_serial);
22  static Hash generateVersionHash(const std::string &data);
23  static std::string generateVersionHashStr(const std::string &data);
24 
25  Manifest sign(const Manifest &manifest, const std::string &report_counter = "") const;
26 
27  Manifest assembleManifest(const InstalledImageInfo &installed_image_info) const;
28  Manifest assembleManifest(const Uptane::Target &target) const;
29 
30  Manifest assembleAndSignManifest(const InstalledImageInfo &installed_image_info) const;
31 
32  private:
33  const Uptane::EcuSerial ecu_serial_;
34  std::shared_ptr<KeyManager> key_mngr_;
35 };
36 
37 } // namespace Uptane
38 
39 #endif // AKTUALIZR_UPTANE_MANIFEST_H
Hash
The Hash class The hash of a file or Uptane metadata.
Definition: types.h:159
KeyManager
Definition: keymanager.h:13
types.h
Uptane::ManifestIssuer
Definition: manifest.h:13
data
General data structures.
Definition: types.h:217
Uptane::InstalledImageInfo
Definition: types.h:306
Uptane::EcuSerial
Definition: types.h:346
Uptane::Target
Definition: types.h:379
Uptane
Base data types that are used in The Update Framework (TUF), part of Uptane.
Definition: packagemanagerinterface.h:18
Uptane::Manifest
Definition: types.h:448