4 #include "keymanager_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 bool isOk()
const {
return ((getPkey().size() != 0u) && (getCert().size() != 0u) && (getCa().size() != 0u)); }
29 std::string generateUptaneKeyPair();
30 KeyType getUptaneKeyType()
const {
return config_.uptane_key_type; }
31 Json::Value signTuf(
const Json::Value &in_data)
const;
36 std::shared_ptr<INvStorage> backend_;
38 std::unique_ptr<P11EngineGuard> p11_;
39 std::unique_ptr<TemporaryFile> tmp_pkey_file;
40 std::unique_ptr<TemporaryFile> tmp_cert_file;
41 std::unique_ptr<TemporaryFile> tmp_ca_file;
44 #endif // KEYMANAGER_H_