Clean up BMCWEB_ENABLE_SSL

This macro came originally from CROW_ENABLE_SSL, and was used as a macro
to optionally compile without openssl being required.

OpenSSL has been pulled into many other dependencies, and has been
functionally required to be included for a long time, so there's no
reason to hold onto this macro.

Remove most uses of the macro, and for the couple functional places the
macro is used, transition to a constexpr if to enable the TLS paths.

This allows a large simplification of code in some places.

Tested: Redfish service validator passes.

Change-Id: Iebd46a68e5e417b6031479e24be3c21bef782f4c
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/src/webserver_run.cpp b/src/webserver_run.cpp
index e5d272e..2f28e16 100644
--- a/src/webserver_run.cpp
+++ b/src/webserver_run.cpp
@@ -24,43 +24,11 @@
 #include "vm_websocket.hpp"
 #include "webassets.hpp"
 
-#include <systemd/sd-daemon.h>
-
 #include <boost/asio/io_context.hpp>
 #include <sdbusplus/asio/connection.hpp>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server.hpp>
 
-constexpr int defaultPort = 18080;
-
-static void setupSocket(crow::App& app)
-{
-    int listenFd = sd_listen_fds(0);
-    if (1 == listenFd)
-    {
-        BMCWEB_LOG_INFO("attempting systemd socket activation");
-        if (sd_is_socket_inet(SD_LISTEN_FDS_START, AF_UNSPEC, SOCK_STREAM, 1,
-                              0) != 0)
-        {
-            BMCWEB_LOG_INFO("Starting webserver on socket handle {}",
-                            SD_LISTEN_FDS_START);
-            app.socket(SD_LISTEN_FDS_START);
-        }
-        else
-        {
-            BMCWEB_LOG_INFO(
-                "bad incoming socket, starting webserver on port {}",
-                defaultPort);
-            app.port(defaultPort);
-        }
-    }
-    else
-    {
-        BMCWEB_LOG_INFO("Starting webserver on port {}", defaultPort);
-        app.port(defaultPort);
-    }
-}
-
 int run()
 {
     auto io = std::make_shared<boost::asio::io_context>();
@@ -122,8 +90,6 @@
 
     crow::login_routes::requestRoutes(app);
 
-    setupSocket(app);
-
 #ifdef BMCWEB_ENABLE_VM_NBDPROXY
     crow::nbd_proxy::requestRoutes(app);
 #endif
@@ -137,10 +103,11 @@
     }
 #endif
 
-#ifdef BMCWEB_ENABLE_SSL
-    BMCWEB_LOG_INFO("Start Hostname Monitor Service...");
-    crow::hostname_monitor::registerHostnameSignal();
-#endif
+    if constexpr (bmcwebEnableTLS)
+    {
+        BMCWEB_LOG_INFO("Start Hostname Monitor Service...");
+        crow::hostname_monitor::registerHostnameSignal();
+    }
 
     bmcweb::registerUserRemovedSignal();