Support uploading multiple certificates for ldap configuration
This code change regards replacing a path to CA file with directory
location holding multiple CA files within it.
Implementation assumes that one can still define TLS_CACERT_FILE as
either a single CA file or directory location.
Depending if the path points to a file or a directory a proper
value will be set in /etc/nslcd.conf
This code change depends on another change requests:
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/25987
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-certificate-manager/+/23348
Tested:
Manually tested, all changes propagate properly to
/etc/nslcd.conf file.
Unit Tests are passing.
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Depends-On: Icd33723c1fc2580679aaaf54b3e99dfb09342402
Depends-On: Ia02c552eb27744e45ccfff3b3a1232d10e65da74
Change-Id: I85dabd4841018f04b0b9e9b58dca9579e7ff1999
diff --git a/phosphor-ldap-config/main.cpp b/phosphor-ldap-config/main.cpp
index 31e0d46..7f5cdad 100644
--- a/phosphor-ldap-config/main.cpp
+++ b/phosphor-ldap-config/main.cpp
@@ -26,7 +26,7 @@
sdbusplus::server::manager::manager objManager(bus, LDAP_CONFIG_ROOT);
phosphor::ldap::ConfigMgr mgr(bus, LDAP_CONFIG_ROOT, LDAP_CONFIG_FILE,
- LDAP_CONF_PERSIST_PATH, TLS_CACERT_FILE,
+ LDAP_CONF_PERSIST_PATH, TLS_CACERT_PATH,
TLS_CERT_FILE);
mgr.restore();