summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt12
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h10
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc28
3 files changed, 0 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 07e5bd5b56..e638310f88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,6 @@ option(ENABLE_LOG "Logging feature" ON)
option(ENABLE_GCOV "gcov code coverage feature" OFF)
option(ENABLE_SANITIZE "Sanitize tool" OFF)
option(ENABLE_SECURITY "Security Ford protocol protection" ON)
-option(ENABLE_HMI_PTU_DECRYPTION "Policy table update parsed by hmi" ON)
option(ENABLE_IAP2EMULATION "IAP2 emulation via tcp" OFF)
option(USE_COTIRE "Use Cotire to speed up build (currently only for commands tests)" ON)
option(USE_GOLD_LD "Use gold linker intead of GNU linker" ON)
@@ -216,12 +215,6 @@ get_property(cValue CACHE HMI PROPERTY VALUE)
file(APPEND "${build_config_path}" "//${cHelpString}\n")
file(APPEND "${build_config_path}" "HMI:${cType}=${cValue}\n\n")
-get_property(cHelpString CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY HELPSTRING)
-get_property(cType CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY TYPE)
-get_property(cValue CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY VALUE)
-file(APPEND "${build_config_path}" "//${cHelpString}\n")
-file(APPEND "${build_config_path}" "ENABLE_HMI_PTU_DECRYPTION:${cType}=${cValue}\n")
-
get_property(cHelpString CACHE BUILD_WEBSOCKET_SERVER_SUPPORT PROPERTY HELPSTRING)
get_property(cType CACHE BUILD_WEBSOCKET_SERVER_SUPPORT PROPERTY TYPE)
get_property(cValue CACHE BUILD_WEBSOCKET_SERVER_SUPPORT PROPERTY VALUE)
@@ -457,11 +450,6 @@ if(ENABLE_SECURITY)
message(STATUS "Security enabled")
endif()
-if(ENABLE_HMI_PTU_DECRYPTION)
- add_definitions(-DUSE_HMI_PTU_DECRYPTION)
- message(STATUS "HMI PTU decription enabled")
-endif()
-
if(ENABLE_IAP2EMULATION)
add_definitions(-DENABLE_IAP2EMULATION)
message(STATUS "IAP2 emulation enabled")
diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
index 32c546df62..0d1a61ec89 100644
--- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
@@ -873,7 +873,6 @@ class PolicyManagerImpl : public PolicyManager {
void ResetTimeout() OVERRIDE;
protected:
-#if defined USE_HMI_PTU_DECRYPTION && defined PROPRIETARY_MODE
/**
* @brief Parse policy table content and convert to PT object
* @param pt_content binary content of PT
@@ -881,15 +880,6 @@ class PolicyManagerImpl : public PolicyManager {
*/
virtual std::shared_ptr<policy_table::Table> Parse(
const BinaryMessage& pt_content);
-#else
- /**
- * @brief Parse policy table content and convert to PT object
- * @param pt_content binary content of PT
- * @return pointer to converted PT
- */
- virtual std::shared_ptr<policy_table::Table> ParseArray(
- const BinaryMessage& pt_content);
-#endif
/**
* @brief Getter for policy settings
diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc
index 4f2e5043d2..3a41cfa08b 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -87,8 +87,6 @@ void PolicyManagerImpl::set_listener(PolicyListener* listener) {
update_status_manager_.set_listener(listener);
}
-#if defined USE_HMI_PTU_DECRYPTION && defined PROPRIETARY_MODE
-
std::shared_ptr<policy_table::Table> PolicyManagerImpl::Parse(
const BinaryMessage& pt_content) {
std::string json(pt_content.begin(), pt_content.end());
@@ -96,21 +94,6 @@ std::shared_ptr<policy_table::Table> PolicyManagerImpl::Parse(
Json::Value value;
if (reader.parse(json, &value)) {
- return std::make_shared<policy_table::Table>(&value);
- } else {
- return std::make_shared<policy_table::Table>();
- }
-}
-
-#else
-
-std::shared_ptr<policy_table::Table> PolicyManagerImpl::ParseArray(
- const BinaryMessage& pt_content) {
- std::string json(pt_content.begin(), pt_content.end());
- utils::JsonReader reader;
- Json::Value value;
-
- if (reader.parse(json, &value)) {
// For PT Update received from SDL Server.
if (value.isObject() && value["data"].isArray() && !value["data"].empty()) {
Json::Value data = value["data"];
@@ -123,8 +106,6 @@ std::shared_ptr<policy_table::Table> PolicyManagerImpl::ParseArray(
}
}
-#endif
-
void PolicyManagerImpl::CheckTriggers() {
SDL_LOG_AUTO_TRACE();
const bool exceed_ignition_cycles = ExceededIgnitionCycles();
@@ -330,16 +311,7 @@ PolicyManager::PtProcessingResult PolicyManagerImpl::LoadPT(
SDL_LOG_DEBUG(
"PTU content is: " << std::string(pt_content.begin(), pt_content.end()));
-#if defined USE_HMI_PTU_DECRYPTION && defined PROPRIETARY_MODE
- // Assuemes Policy Table was parsed, formatted, and/or decrypted by
- // the HMI after system request before calling OnReceivedPolicyUpdate
- // Parse message into table struct
std::shared_ptr<policy_table::Table> pt_update = Parse(pt_content);
-#else
- // Message Received from server unecnrypted with PTU in first element
- // of 'data' array. No Parsing was done by HMI.
- std::shared_ptr<policy_table::Table> pt_update = ParseArray(pt_content);
-#endif
if (!pt_update) {
SDL_LOG_WARN("Parsed table pointer is NULL.");
;