fix: resolve incorrect key on bmcweb persistent file
This commit is intended to fix the bug on bmcweb when we send patch
request to `/redfish/v1/AccountService`, especially when changing the
`CertificateMappingAttribute`. The expected behavior is that if we
send the patch request, the bmc device will update the internal state
and also update the persistent file (`bmcweb_persistent_data.json`)
to store the current `CertificateMappingAttribute`. This is done so
that after we reboot, the bmc device will retain the
`CertificateMappingAttribute`
However, currently that doesn't happen because there is mismatch on the
key on the persistent file. It should be "MTLSCommonNameParseMode",
instead of "TLSCommonNameParseMode". This commit is intended to solve
this bug
Change-Id: I38f03fd5eefa76079d76552548b411d95639b470
Signed-off-by: Malik Akbar Hashemi Rafsanjani <malikrafsan@meta.com>
diff --git a/include/persistent_data.hpp b/include/persistent_data.hpp
index fb22977..afd2dc0 100644
--- a/include/persistent_data.hpp
+++ b/include/persistent_data.hpp
@@ -267,7 +267,7 @@
authConfig["BasicAuth"] = c.basic;
authConfig["TLS"] = c.tls;
authConfig["TLSStrict"] = c.tlsStrict;
- authConfig["TLSCommonNameParseMode"] =
+ authConfig["MTLSCommonNameParseMode"] =
static_cast<int>(c.mTLSCommonNameParsingMode);
nlohmann::json& eventserviceConfig = data["eventservice_config"];