4 #include "keymanager_config.h" 6 #include "http/httpinterface.h" 8 #include "storage/invstorage.h" 9 #include "utilities/utils.h" 15 void copyCertsToCurl(
const std::shared_ptr<HttpInterface> &http);
17 void loadKeys(
const std::string *pkey_content =
nullptr,
const std::string *cert_content =
nullptr,
18 const std::string *ca_content =
nullptr);
19 std::string getPkeyFile()
const;
20 std::string getCertFile()
const;
21 std::string getCaFile()
const;
22 std::string getPkey()
const;
23 std::string getCert()
const;
24 std::string getCa()
const;
25 std::string getCN()
const;
26 bool isOk()
const {
return ((getPkey().size() != 0u) && (getCert().size() != 0u) && (getCa().size() != 0u)); }
27 std::string generateUptaneKeyPair();
28 KeyType getUptaneKeyType()
const {
return config_.uptane_key_type; }
29 Json::Value signTuf(
const Json::Value &in_data)
const;
34 std::shared_ptr<INvStorage> backend_;
36 std::unique_ptr<P11EngineGuard> p11_;
37 std::unique_ptr<TemporaryFile> tmp_pkey_file;
38 std::unique_ptr<TemporaryFile> tmp_cert_file;
39 std::unique_ptr<TemporaryFile> tmp_ca_file;
42 #endif // KEYMANAGER_H_