summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorAndriy Byzhynar <AByzhynar@luxoft.com>2018-04-12 20:10:35 +0300
committerAndrii Kalinich <AKalinich@luxoft.com>2018-06-18 20:18:46 +0300
commit1e1c90e6871f4ea1e795cb25b944b9ca2274fda9 (patch)
tree98ab91be589c75d3c145773b12e81103dfa00c77 /src/components
parenta7eba255dff0581da32e682a585ae833559a4082 (diff)
downloadsdl_core-1e1c90e6871f4ea1e795cb25b944b9ca2274fda9.tar.gz
Add correct certificate expiration handling
Diffstat (limited to 'src/components')
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc4
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc8
2 files changed, 5 insertions, 7 deletions
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 84d4ac853a..915965f569 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -1157,6 +1157,10 @@ bool PolicyManagerImpl::InitPT(const std::string& file_name,
if (ret) {
RefreshRetrySequence();
update_status_manager_.OnPolicyInit(cache_->UpdateRequired());
+ const std::string certificate_data = cache_->GetCertificate();
+ if (!certificate_data.empty()) {
+ listener_->OnCertificateUpdated(certificate_data);
+ }
}
return ret;
}
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index 6ab63cbdda..5516af81c1 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -1425,17 +1425,11 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
}
#ifdef ENABLE_SECURITY
+ const uint8_t protocol_version = packet->protocol_version();
const bool protection =
-<<<<<<< HEAD
- // Protocol version 1 is not support protection
- (packet->protocol_version() > PROTOCOL_VERSION_1)
- ? packet->protection_flag()
- : false;
-=======
// Protocol version 1 does not support protection
(protocol_version > PROTOCOL_VERSION_1) ? packet->protection_flag()
: false;
->>>>>>> Add handling of wrong force protection settings in ini file
#else
const bool protection = false;
#endif // ENABLE_SECURITY