Fix handling of ssl_key_handler for WebUI
The previous commit 90cd2e1 [1] causes WebUI to fail to load and
connect. It is because a global static var (`hasWebuiRoute`) is
instantiated per compile unit and it ends up causing the inconsistency
of the value of it.
Tested:
- Verify WebUI to load successful
- Redfish Service Validator passes
[1] https://github.com/openbmc/bmcweb/commit/90cd2e1d2e2228b0c575c9a3b6b2dc75eac9eb68
Change-Id: I09c3a9a831528e25c09299b0ee15993974d94d88
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
diff --git a/src/ssl_key_handler.cpp b/src/ssl_key_handler.cpp
index f1442b9..c36841b 100644
--- a/src/ssl_key_handler.cpp
+++ b/src/ssl_key_handler.cpp
@@ -553,7 +553,7 @@
mode |= boost::asio::ssl::verify_peer;
mode |= boost::asio::ssl::verify_fail_if_no_peer_cert;
}
- else if (!forward_unauthorized::hasWebuiRoute)
+ else if (!forward_unauthorized::hasWebuiRoute())
{
// This is a HACK
// If the webui is installed, and TLSSTrict is false, we don't want to