CA Certs: Modify object entry path to fix object sub-tree hierarchy
Currently there is no interface added signal generated as object
path is not following hierarchy.
to fix this behaviour, this commit modifies object entry path
to /xyz/openbmc_project/certs/ca/entry/<id>
InterfacesAdded signal:
signal time=1619111735.917791 sender=:1.660 -> destination=(null destination)
serial=68 path=/xyz/openbmc_project/certs/ca; interface=org.freedesktop.DBus.ObjectManager;
member=InterfacesAdded
object path "/xyz/openbmc_project/certs/ca/entry/6"
Tested by:
D-bus monitor while Creating dbus objects
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: I3ce8aa2b2ec5da321557ea40f484ea2947d57442
diff --git a/bmc-vmi-ca/ca_certs_manager.cpp b/bmc-vmi-ca/ca_certs_manager.cpp
index f6622ff..3b11a53 100644
--- a/bmc-vmi-ca/ca_certs_manager.cpp
+++ b/bmc-vmi-ca/ca_certs_manager.cpp
@@ -13,7 +13,6 @@
{
namespace cert
{
-static constexpr auto objectEntry = "/xyz/openbmc_project/certs/entry";
static constexpr auto maxCertSize = 4096;
namespace fs = std::filesystem;
using namespace phosphor::logging;
@@ -33,7 +32,7 @@
Argument::ARGUMENT_VALUE(csr.c_str()));
}
auto id = lastEntryId + 1;
- objPath = fs::path(objectEntry) / std::to_string(id);
+ objPath = fs::path(OBJPATH) / "ca" / "entry" / std::to_string(id);
std::string cert;
// Creating the dbus object here with the empty certificate string
// actual signing is being done by the hypervisor, once it signs then