Implementation of BMC VMI certificate manager
This manager is to create and manage entries
for each host CSR request which needs to shared
with host.
this commits implements dbus interfaces
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/31808
This feature can be enabled by using below feature flag
"--enable-ca-cert-extension"
Testby:
Creating CSR entries
Deleting entries
Setting properties
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: I24829b839feac6264f32053b9be63daef6599379
diff --git a/bmc-vmi-ca/mainapp.cpp b/bmc-vmi-ca/mainapp.cpp
new file mode 100644
index 0000000..8c1aa06
--- /dev/null
+++ b/bmc-vmi-ca/mainapp.cpp
@@ -0,0 +1,28 @@
+#include "config.h"
+
+#include "ca_certs_manager.hpp"
+
+#include <sdeventplus/event.hpp>
+#include <string>
+
+int main(int argc, char** argv)
+{
+ auto bus = sdbusplus::bus::new_default();
+ std::string objPath = "/xyz/openbmc_project/certs/ca";
+
+ // Add sdbusplus ObjectManager
+ sdbusplus::server::manager::manager objManager(bus, objPath.c_str());
+
+ // Get default event loop
+ auto event = sdeventplus::Event::get_default();
+
+ // Attach the bus to sd_event to service user requests
+ bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
+
+ ca::cert::CACertMgr manager(bus, event, objPath.c_str());
+
+ std::string busName = "xyz.openbmc_project.Certs.ca.authority.Manager";
+ bus.request_name(busName.c_str());
+ event.loop();
+ return 0;
+}