phosphor-ldap-conf: handle "PropertiesChanged" signal on the ldap cert object
When LDAP client certificate is changed through Replace method on the cert object.
Object would emit the signal "PropertiesChanged". 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: I5347b13e0bf76742d39dc7a26c96ec5d4dd5a2c6
diff --git a/phosphor-ldap-config/ldap_config.hpp b/phosphor-ldap-config/ldap_config.hpp
index d2cc8de..9cf59f7 100644
--- a/phosphor-ldap-config/ldap_config.hpp
+++ b/phosphor-ldap-config/ldap_config.hpp
@@ -97,8 +97,8 @@
* @param[in] parent - parent of config object.
*/
Config(sdbusplus::bus::bus& bus, const char* path, const char* filePath,
- const char* caCertFile, ConfigIface::Type lDAPType,
- ConfigMgr& parent);
+ const char* caCertFile, const char* certFile,
+ ConfigIface::Type lDAPType, ConfigMgr& parent);
using ConfigIface::groupNameAttribute;
using ConfigIface::lDAPBaseDN;
@@ -280,6 +280,12 @@
void certificateInstalled(sdbusplus::message::message& msg);
sdbusplus::bus::match_t certificateInstalledSignal;
+ /** @brief React to certificate changed signal
+ * @param[in] msg - sdbusplus message
+ */
+ void certificateChanged(sdbusplus::message::message& msg);
+ sdbusplus::bus::match_t certificateChangedSignal;
+
friend class MockConfigMgr;
};