From 676a112313b76f4a91d2805920910431d543b393 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Mon, 10 Mar 2025 00:57:34 -0400 Subject: [PATCH] fix missing check for ENABLE_TCL_SSL compilation directive; properly flag crypto as hard disabled if ENABLE_TCL_SSL isn't set; --- src/fne/CryptoContainer.cpp | 4 +++- src/fne/HostFNE.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fne/CryptoContainer.cpp b/src/fne/CryptoContainer.cpp index 2dbdffd8..ba471071 100644 --- a/src/fne/CryptoContainer.cpp +++ b/src/fne/CryptoContainer.cpp @@ -24,7 +24,7 @@ #if defined(ENABLE_TCP_SSL) #include #include -#endif +#endif // ENABLE_TCP_SSL using namespace crypto; @@ -38,6 +38,7 @@ using namespace crypto; // Global Functions // --------------------------------------------------------------------------- +#if defined(ENABLE_TCP_SSL) /** * @brief Calculates the length of a decoded base64 string. * @param b64input String containing the base64 encoded data. @@ -84,6 +85,7 @@ int base64Decode(char* b64message, uint8_t** buffer) return decodeLen; } +#endif // ENABLE_TCP_SSL /** * @brief diff --git a/src/fne/HostFNE.cpp b/src/fne/HostFNE.cpp index ad1ccb50..b131e92f 100644 --- a/src/fne/HostFNE.cpp +++ b/src/fne/HostFNE.cpp @@ -356,6 +356,9 @@ bool HostFNE::readParams() yaml::Node cryptoContainer = masterConf["crypto_container"]; bool cryptoContainerEnabled = cryptoContainer["enabled"].as(false); +#if !defined(ENABLE_TCP_SSL) + cryptoContainerEnabled = false; +#endif // ENABLE_TCP_SSL std::string cryptoContainerEKC = cryptoContainer["file"].as(); std::string cryptoContainerPassword = cryptoContainer["password"].as(); uint32_t cryptoContainerReload = cryptoContainer["time"].as(30U);