Implement Certificate and Install interface
Implemented Certificate interface for certificate properties
and install interface to cater for replacing certificate
Change-Id: I06c1b0ee4258a1cf8670f8a9c25254465e1cad48
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/certificate.hpp b/certificate.hpp
index 8227b05..fc48f03 100644
--- a/certificate.hpp
+++ b/certificate.hpp
@@ -4,11 +4,19 @@
#include <filesystem>
#include <phosphor-logging/elog.hpp>
+#include <xyz/openbmc_project/Certs/Certificate/server.hpp>
+#include <xyz/openbmc_project/Certs/Install/server.hpp>
namespace phosphor
{
namespace certs
{
+using CertificateIface = sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::Certs::server::Certificate>;
+using InstallIface = sdbusplus::xyz::openbmc_project::Certs::server::Install;
+using CertIfaces =
+ sdbusplus::server::object::object<CertificateIface, InstallIface>;
+
using CertificateType = std::string;
using UnitsToRestart = std::string;
using CertInstallPath = std::string;
@@ -36,7 +44,7 @@
* xyz.openbmc_project.Certs.Certificate DBus API
* xyz.openbmc_project.Certs.Instal DBus API
*/
-class Certificate
+class Certificate : public CertIfaces
{
public:
Certificate() = delete;
@@ -64,7 +72,7 @@
* (possibly CA signed) Certificate file.
* @param[in] filePath - Certificate file path.
*/
- void install(const std::string filePath);
+ void install(const std::string filePath) override;
private:
/** @brief Load Certificate file into the X509 structre.