phosphor-ldap-conf: handle "InterfaceAdded" signal on the ldap cert object
When LDAP client certificate is uploaded through install method on the
cert object, Object would emit the signal "InterfaceAdded".
Upon receiving the signal, Config file would be updated with
below given info if secure ldap is enabled:
tls_cert <path client certificate file>
tls_key <path to client certificate file>
Tested By: Unit Tested
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Change-Id: I54b3e116af1b8a9057d91797d4074d39efc65bb0
diff --git a/phosphor-ldap-config/ldap_config_mgr.hpp b/phosphor-ldap-config/ldap_config_mgr.hpp
index dc04546..7186503 100644
--- a/phosphor-ldap-config/ldap_config_mgr.hpp
+++ b/phosphor-ldap-config/ldap_config_mgr.hpp
@@ -52,10 +52,11 @@
* @param[in] caCertFile - LDAP's CA certificate file.
*/
ConfigMgr(sdbusplus::bus::bus& bus, const char* path, const char* filePath,
- const char* dbusPersistentPath, const char* caCertFile) :
+ const char* dbusPersistentPath, const char* caCertFile,
+ const char* certFile) :
CreateIface(bus, path, true),
dbusPersistentPath(dbusPersistentPath), configFilePath(filePath),
- bus(bus)
+ tlsCacertFile(caCertFile), tlsCertFile(certFile), bus(bus)
{
}
@@ -116,6 +117,7 @@
protected:
std::string configFilePath{};
std::string tlsCacertFile{};
+ std::string tlsCertFile{};
/** @brief Persistent sdbusplus D-Bus bus connection. */
sdbusplus::bus::bus& bus;