Aktualizr
C++ SOTA Client
bootstrap.h
1 #ifndef AKTUALIZR_BOOTSTRAP_H
2 #define AKTUALIZR_BOOTSTRAP_H
3 
4 #include <boost/filesystem.hpp>
5 #include <string>
6 
7 class Bootstrap {
8  public:
9  Bootstrap(const boost::filesystem::path& provision_path, const std::string& provision_password);
10 
11  static void readTlsP12(const std::string& p12_str, const std::string& provision_password, std::string& pkey,
12  std::string& cert, std::string& ca);
13  static std::string readServerUrl(const boost::filesystem::path& provision_path);
14  static std::string readServerCa(const boost::filesystem::path& provision_path);
15 
16  std::string getCa() const { return ca_; }
17  std::string getCert() const { return cert_; }
18  std::string getPkey() const { return pkey_; }
19 
20  private:
21  std::string ca_;
22  std::string cert_;
23  std::string pkey_;
24 };
25 
26 #endif // AKTUALIZR_BOOTSTRAP_H
Bootstrap
Definition: bootstrap.h:7