blob: 28b05bc3bbf575819f540d66105c11e18569272b [file] [log] [blame]
Ravi Tejaa49895e2020-06-16 03:57:58 -05001#include "config.h"
2
3#include "ca_certs_manager.hpp"
4
5#include <sdeventplus/event.hpp>
6#include <string>
7
8int main(int argc, char** argv)
9{
10 auto bus = sdbusplus::bus::new_default();
Ravi Teja86a31ba2021-04-23 04:22:49 -050011 static constexpr auto objPath = "/xyz/openbmc_project/certs/ca";
Ravi Tejaa49895e2020-06-16 03:57:58 -050012
13 // Add sdbusplus ObjectManager
Ravi Teja86a31ba2021-04-23 04:22:49 -050014 sdbusplus::server::manager::manager objManager(bus, objPath);
Ravi Tejaa49895e2020-06-16 03:57:58 -050015
16 // Get default event loop
17 auto event = sdeventplus::Event::get_default();
18
19 // Attach the bus to sd_event to service user requests
20 bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
21
Ravi Teja86a31ba2021-04-23 04:22:49 -050022 ca::cert::CACertMgr manager(bus, event, objPath);
Ravi Tejaa49895e2020-06-16 03:57:58 -050023
24 std::string busName = "xyz.openbmc_project.Certs.ca.authority.Manager";
25 bus.request_name(busName.c_str());
26 event.loop();
27 return 0;
28}