4 #include "libaktualizr/config.h"
7 #include "http/httpinterface.h"
9 #include "utilities/utils.h"
19 void loadKeys(
const std::string *pkey_content =
nullptr,
const std::string *cert_content =
nullptr,
20 const std::string *ca_content =
nullptr);
21 std::string getPkeyFile()
const;
22 std::string getCertFile()
const;
23 std::string getCaFile()
const;
24 std::string getPkey()
const;
25 std::string getCert()
const;
26 std::string getCa()
const;
27 std::string getCN()
const;
28 void getCertInfo(std::string *subject, std::string *issuer, std::string *not_before, std::string *not_after)
const;
29 bool isOk()
const {
return ((getPkey().size() != 0U) && (getCert().size() != 0U) && (getCa().size() != 0U)); }
30 std::string generateUptaneKeyPair();
31 KeyType getUptaneKeyType()
const {
return config_.uptane_key_type; }
32 Json::Value signTuf(
const Json::Value &in_data)
const;
37 std::shared_ptr<INvStorage> backend_;
39 std::unique_ptr<P11EngineGuard> p11_;
40 std::unique_ptr<TemporaryFile> tmp_pkey_file;
41 std::unique_ptr<TemporaryFile> tmp_cert_file;
42 std::unique_ptr<TemporaryFile> tmp_ca_file;
45 #endif // KEYMANAGER_H_