summaryrefslogtreecommitdiff
path: root/src/components/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/include')
-rw-r--r--src/components/include/application_manager/policies/policy_handler_interface.h11
-rw-r--r--src/components/include/application_manager/policies/policy_handler_observer.h12
-rw-r--r--src/components/include/policy/policy_external/policy/policy_listener.h4
-rw-r--r--src/components/include/policy/policy_external/policy/policy_manager.h7
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_listener.h11
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h9
-rw-r--r--src/components/include/protocol_handler/protocol_handler.h12
-rw-r--r--src/components/include/security_manager/security_manager.h18
-rw-r--r--src/components/include/security_manager/security_manager_listener.h17
-rw-r--r--src/components/include/test/application_manager/policies/mock_policy_handler_interface.h6
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_policy_listener.h3
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_policy_manager.h8
-rw-r--r--src/components/include/test/policy/policy_external/policy/mock_ptu_retry_handler.h48
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h5
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h6
-rw-r--r--src/components/include/test/protocol_handler/mock_protocol_handler.h6
-rw-r--r--src/components/include/test/security_manager/mock_security_manager.h7
-rw-r--r--src/components/include/test/security_manager/mock_security_manager_listener.h6
-rw-r--r--src/components/include/test/utils/mock_system_time_handler.h1
19 files changed, 180 insertions, 17 deletions
diff --git a/src/components/include/application_manager/policies/policy_handler_interface.h b/src/components/include/application_manager/policies/policy_handler_interface.h
index 8e450edd49..6c08dbcb0b 100644
--- a/src/components/include/application_manager/policies/policy_handler_interface.h
+++ b/src/components/include/application_manager/policies/policy_handler_interface.h
@@ -52,6 +52,10 @@
#include "smart_objects/smart_object.h"
#include "utils/callable.h"
#include "utils/custom_string.h"
+#include "utils/optional.h"
+#ifdef EXTERNAL_PROPRIETARY_MODE
+#include "policy/ptu_retry_handler.h"
+#endif // EXTERNAL_PROPRIETARY_MODE
using namespace ::rpc::policy_table_interface_base;
namespace policy {
@@ -59,6 +63,8 @@ typedef std::shared_ptr<utils::Callable> StatusNotifier;
typedef std::shared_ptr<PolicyEncryptionFlagGetterInterface>
PolicyEncryptionFlagGetterInterfaceSPtr;
+class PTURetryHandler;
+
class PolicyHandlerInterface {
public:
virtual ~PolicyHandlerInterface() {}
@@ -87,8 +93,11 @@ class PolicyHandlerInterface {
virtual void OnSnapshotCreated(const BinaryMessage& pt_string,
const std::vector<int>& retry_delay_seconds,
uint32_t timeout_exchange) = 0;
+
+ virtual PTURetryHandler& ptu_retry_handler() const = 0;
#else // EXTERNAL_PROPRIETARY_MODE
- virtual void OnSnapshotCreated(const BinaryMessage& pt_string) = 0;
+ virtual void OnSnapshotCreated(const BinaryMessage& pt_string,
+ const PTUIterationType iteration_type) = 0;
#endif // EXTERNAL_PROPRIETARY_MODE
virtual bool GetPriority(const std::string& policy_app_id,
diff --git a/src/components/include/application_manager/policies/policy_handler_observer.h b/src/components/include/application_manager/policies/policy_handler_observer.h
index 42348e7705..fc22d196df 100644
--- a/src/components/include/application_manager/policies/policy_handler_observer.h
+++ b/src/components/include/application_manager/policies/policy_handler_observer.h
@@ -55,6 +55,18 @@ class PolicyHandlerObserver {
virtual void OnPTInited() {}
+ virtual void OnPTUTimeoutExceeded() {}
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ /**
+ * @brief OnCertDecryptFinished is called when certificate decryption is
+ * finished in the external flow
+ * @param decrypt_result bool value indicating whether decryption was
+ * successful
+ */
+ virtual void OnCertDecryptFinished(const bool decrypt_result) {}
+#endif
+
virtual ~PolicyHandlerObserver() {}
};
} // namespace policy
diff --git a/src/components/include/policy/policy_external/policy/policy_listener.h b/src/components/include/policy/policy_external/policy/policy_listener.h
index 8203f5c9b6..8220d05584 100644
--- a/src/components/include/policy/policy_external/policy/policy_listener.h
+++ b/src/components/include/policy/policy_external/policy/policy_listener.h
@@ -42,6 +42,8 @@ namespace policy {
namespace custom_str = utils::custom_string;
+class PTURetryHandler;
+
class PolicyListener {
public:
virtual ~PolicyListener() {}
@@ -187,6 +189,8 @@ class PolicyListener {
* LockScreenDismissal
*/
virtual void OnLockScreenDismissalStateChanged() = 0;
+
+ virtual PTURetryHandler& ptu_retry_handler() const = 0;
};
} // namespace policy
#endif // SRC_COMPONENTS_INCLUDE_POLICY_POLICY_EXTERNAL_POLICY_POLICY_LISTENER_H_
diff --git a/src/components/include/policy/policy_external/policy/policy_manager.h b/src/components/include/policy/policy_external/policy/policy_manager.h
index 1242c7a460..bf0e03b0b8 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -44,6 +44,7 @@
#include "policy/policy_listener.h"
#include "policy/policy_table/types.h"
#include "policy/policy_types.h"
+#include "policy/ptu_retry_handler.h"
#include "policy/usage_statistics/statistics_manager.h"
namespace policy {
@@ -51,7 +52,8 @@ class PolicySettings;
typedef std::shared_ptr<utils::Callable> StatusNotifier;
class PolicyManager : public usage_statistics::StatisticsManager,
- public PolicyEncryptionFlagGetterInterface {
+ public PolicyEncryptionFlagGetterInterface,
+ public PTURetryHandler {
public:
/**
* @brief The NotificationMode enum defines whether application will be
@@ -206,8 +208,9 @@ class PolicyManager : public usage_statistics::StatisticsManager,
/**
* @brief Resets retry sequence
+ * @param reset_type - reset retry count with sending OnStatusUpdate or not
*/
- virtual void ResetRetrySequence() = 0;
+ virtual void ResetRetrySequence(const ResetRetryCountType reset_type) = 0;
/**
* @brief Gets timeout to wait before next retry updating PT
diff --git a/src/components/include/policy/policy_regular/policy/policy_listener.h b/src/components/include/policy/policy_regular/policy/policy_listener.h
index d717822cac..bbe220060e 100644
--- a/src/components/include/policy/policy_regular/policy/policy_listener.h
+++ b/src/components/include/policy/policy_regular/policy/policy_listener.h
@@ -79,11 +79,13 @@ class PolicyListener {
*
* @param pt_string the snapshot
*
- * @param retry_seconds retry sequence timeouts.
+ * @param iteration_type flag indicating whether PTU was caused by retry
+ * sequence.
*
* @param timeout_exceed timeout.
*/
- virtual void OnSnapshotCreated(const BinaryMessage& pt_string) = 0;
+ virtual void OnSnapshotCreated(const BinaryMessage& pt_string,
+ const PTUIterationType iteration_type) = 0;
/**
* @brief Make appropriate changes for related applications permissions and
@@ -119,6 +121,11 @@ class PolicyListener {
virtual void OnCertificateUpdated(const std::string& certificate_data) = 0;
/**
+ * @brief OnPTUTimeOut the callback which signals if PTU timeout occured
+ */
+ virtual void OnPTUTimeOut() = 0;
+
+ /**
* @brief OnAuthTokenUpdated the callback which signals if an app's auth token
* field has been updated during a PTU
*
diff --git a/src/components/include/policy/policy_regular/policy/policy_manager.h b/src/components/include/policy/policy_regular/policy/policy_manager.h
index 65f4cb69ff..27ae18eca8 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -117,7 +117,7 @@ class PolicyManager : public usage_statistics::StatisticsManager,
/**
* @brief PTU is needed, for this PTS has to be formed and sent.
*/
- virtual bool RequestPTUpdate() = 0;
+ virtual bool RequestPTUpdate(const PTUIterationType iteration_type) = 0;
/**
* @brief Check if specified RPC for specified application
@@ -202,6 +202,13 @@ class PolicyManager : public usage_statistics::StatisticsManager,
virtual std::string ForcePTExchangeAtUserRequest() = 0;
/**
+ * @brief Resets retry sequence
+ * @param send_event - if true corresponding event is sent to
+ * UpdateStatusManager
+ */
+ virtual void ResetRetrySequence(const ResetRetryCountType reset_type) = 0;
+
+ /**
* @brief Gets timeout to wait before next retry updating PT
* If timeout is less or equal to zero then the retry sequence is not need.
* @return timeout in seconds
diff --git a/src/components/include/protocol_handler/protocol_handler.h b/src/components/include/protocol_handler/protocol_handler.h
index 619c47ac34..aacb31c260 100644
--- a/src/components/include/protocol_handler/protocol_handler.h
+++ b/src/components/include/protocol_handler/protocol_handler.h
@@ -118,7 +118,7 @@ class ProtocolHandler {
/**
* \brief Called to notify all handsheke handlers about handshake failure.
*/
- virtual void NotifyOnFailedHandshake() = 0;
+ virtual void NotifyOnGetSystemTimeFailed() = 0;
/**
* \brief Protocol handler settings getter
@@ -141,6 +141,16 @@ class ProtocolHandler {
virtual bool IsRPCServiceSecure(const uint32_t connection_key) const = 0;
+ virtual void ProcessFailedPTU() = 0;
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ /**
+ * @brief ProcessFailedCertDecrypt is called to notify security manager that
+ * certificate decryption failed in the external flow
+ */
+ virtual void ProcessFailedCertDecrypt() = 0;
+#endif
+
protected:
/**
* \brief Destructor
diff --git a/src/components/include/security_manager/security_manager.h b/src/components/include/security_manager/security_manager.h
index e02a3a1cbe..358c4e5268 100644
--- a/src/components/include/security_manager/security_manager.h
+++ b/src/components/include/security_manager/security_manager.h
@@ -166,7 +166,17 @@ class SecurityManager : public protocol_handler::ProtocolObserver,
/**
* @brief Notify all listeners that handshake was failed
*/
- virtual void NotifyListenersOnHandshakeFailed() = 0;
+ virtual void NotifyListenersOnGetSystemTimeFailed() = 0;
+
+ virtual void ProcessFailedPTU() = 0;
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ /**
+ * @brief ProcessFailedCertDecrypt is called to notify listeners that
+ * certificate decryption failed in the external flow
+ */
+ virtual void ProcessFailedCertDecrypt() = 0;
+#endif
/**
* @brief Check if policy certificate data is empty
@@ -175,6 +185,12 @@ class SecurityManager : public protocol_handler::ProtocolObserver,
virtual bool IsPolicyCertificateDataEmpty() = 0;
/**
+ * @brief ResetPendingSystemTimeRequests resets waiting for system time
+ * requests flag
+ */
+ virtual void ResetPendingSystemTimeRequests() = 0;
+
+ /**
* \brief Add/Remove for SecurityManagerListener
*/
virtual void AddListener(SecurityManagerListener* const listener) = 0;
diff --git a/src/components/include/security_manager/security_manager_listener.h b/src/components/include/security_manager/security_manager_listener.h
index 00a4c68134..0648ed0a11 100644
--- a/src/components/include/security_manager/security_manager_listener.h
+++ b/src/components/include/security_manager/security_manager_listener.h
@@ -52,13 +52,28 @@ class SecurityManagerListener {
* @brief Notification about handshake failure
* @return true on success notification handling or false otherwise
*/
- virtual bool OnHandshakeFailed() = 0;
+ virtual bool OnGetSystemTimeFailed() = 0;
/**
* @brief Notify listeners that certificate update is required.
*/
virtual void OnCertificateUpdateRequired() = 0;
+ virtual bool OnPTUFailed() = 0;
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ /**
+ * @brief OnCertDecryptFailed is called when certificate decryption fails in
+ * external flow
+ * @return since this callback is a part of SecurityManagerListener, bool
+ * return value is used to indicate whether listener instance can be deleted
+ * by calling entity. if true - listener can be deleted and removed from
+ * listeners by SecurityManager, false - listener retains its place within
+ * SecurityManager.
+ */
+ virtual bool OnCertDecryptFailed() = 0;
+#endif
+
/**
* @brief Get certificate data from policy
* @param reference to string where to save certificate data
diff --git a/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h b/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h
index f5b6f28825..defdad38f7 100644
--- a/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h
+++ b/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h
@@ -76,7 +76,9 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
const std::vector<int>& retry_delay_seconds,
uint32_t timeout_exchange));
#else // EXTERNAL_PROPRIETARY_MODE
- MOCK_METHOD1(OnSnapshotCreated, void(const policy::BinaryMessage& pt_string));
+ MOCK_METHOD2(OnSnapshotCreated,
+ void(const policy::BinaryMessage& pt_string,
+ const policy::PTUIterationType iteration_type));
#endif // EXTERNAL_PROPRIETARY_MODE
MOCK_CONST_METHOD2(GetPriority,
@@ -261,6 +263,8 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface {
#ifdef EXTERNAL_PROPRIETARY_MODE
MOCK_CONST_METHOD0(GetMetaInfo, const policy::MetaInfo());
+ MOCK_METHOD0(IncrementRetryIndex, void());
+ MOCK_CONST_METHOD0(ptu_retry_handler, policy::PTURetryHandler&());
#endif // EXTERNAL_PROPRIETARY_MODE
MOCK_METHOD1(Increment, void(usage_statistics::GlobalCounterId type));
diff --git a/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h b/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h
index 16341ed4f4..2eb5b3300b 100644
--- a/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h
+++ b/src/components/include/test/policy/policy_external/policy/mock_policy_listener.h
@@ -112,6 +112,9 @@ class MockPolicyListener : public ::policy::PolicyListener {
const std::string& policy_app_id,
const std::string& hmi_level));
MOCK_METHOD0(OnLockScreenDismissalStateChanged, void());
+ MOCK_METHOD1(OnCertDecryptFinished, void(bool));
+ MOCK_METHOD0(IncrementRetryIndex, void());
+ MOCK_CONST_METHOD0(ptu_retry_handler, policy::PTURetryHandler&());
};
} // namespace policy_test
diff --git a/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h b/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h
index 7c71643044..cfe5844757 100644
--- a/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h
+++ b/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h
@@ -102,7 +102,8 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD0(IncrementIgnitionCycles, void());
MOCK_METHOD0(ForcePTExchange, std::string());
MOCK_METHOD0(ForcePTExchangeAtUserRequest, std::string());
- MOCK_METHOD0(ResetRetrySequence, void());
+ MOCK_METHOD1(ResetRetrySequence,
+ void(const policy::ResetRetryCountType send_event));
MOCK_METHOD0(NextRetryTimeout, int());
MOCK_METHOD0(TimeoutExchangeMSec, uint32_t());
MOCK_METHOD0(RetrySequenceDelaysSeconds, const std::vector<int>());
@@ -291,6 +292,11 @@ class MockPolicyManager : public PolicyManager {
RequestType::State(const std::string& policy_app_id));
MOCK_CONST_METHOD1(GetAppRequestSubTypesState,
RequestSubType::State(const std::string& policy_app_id));
+ MOCK_METHOD0(IncrementPTURetryIndex, void());
+ MOCK_CONST_METHOD0(IsAllowedPTURetryCountExceeded, bool());
+ MOCK_CONST_METHOD0(IsAllowedRetryCountExceeded, bool());
+ MOCK_METHOD0(OnSystemRequestReceived, void());
+ MOCK_METHOD0(RetrySequenceFailed, void());
};
} // namespace policy_manager_test
} // namespace components
diff --git a/src/components/include/test/policy/policy_external/policy/mock_ptu_retry_handler.h b/src/components/include/test/policy/policy_external/policy/mock_ptu_retry_handler.h
new file mode 100644
index 0000000000..d76c791b85
--- /dev/null
+++ b/src/components/include/test/policy/policy_external/policy/mock_ptu_retry_handler.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (c) 2019, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SRC_COMPONENTS_POLICY_POLICY_EXTERNAL_INCLUDE_POLICY_MOCK_PTU_RETRY_HANDLER_H_
+#define SRC_COMPONENTS_POLICY_POLICY_EXTERNAL_INCLUDE_POLICY_MOCK_PTU_RETRY_HANDLER_H_
+
+#include "policy/ptu_retry_handler.h"
+
+namespace policy {
+
+class MockPTURetryHandler : public PTURetryHandler {
+ public:
+ MOCK_CONST_METHOD0(IsAllowedRetryCountExceeded, bool());
+ MOCK_METHOD0(OnSystemRequestReceived, void());
+ MOCK_METHOD0(RetrySequenceFailed, void());
+};
+} // namespace policy
+
+#endif // SRC_COMPONENTS_POLICY_POLICY_EXTERNAL_INCLUDE_POLICY_MOCK_PTU_RETRY_HANDLER_H_ \ No newline at end of file
diff --git a/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h b/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h
index d0d85409a2..48c549e91b 100644
--- a/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h
+++ b/src/components/include/test/policy/policy_regular/policy/mock_policy_listener.h
@@ -77,7 +77,9 @@ class MockPolicyListener : public ::policy::PolicyListener {
MOCK_METHOD1(OnUpdateHMIAppType,
void(std::map<std::string, policy::StringArray>));
MOCK_METHOD1(GetAvailableApps, void(std::queue<std::string>&));
- MOCK_METHOD1(OnSnapshotCreated, void(const policy::BinaryMessage& pt_string));
+ MOCK_METHOD2(OnSnapshotCreated,
+ void(const policy::BinaryMessage& pt_string,
+ const policy::PTUIterationType iteration_type));
MOCK_METHOD0(CanUpdate, bool());
MOCK_METHOD1(OnCertificateUpdated, void(const std::string&));
MOCK_METHOD2(OnAuthTokenUpdated,
@@ -105,6 +107,7 @@ class MockPolicyListener : public ::policy::PolicyListener {
const std::string& policy_app_id,
const std::string& hmi_level));
MOCK_METHOD0(OnLockScreenDismissalStateChanged, void());
+ MOCK_METHOD0(OnPTUTimeOut, void());
};
} // namespace policy_test
diff --git a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h
index 4ddd8cb309..d23674c060 100644
--- a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h
+++ b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h
@@ -85,7 +85,8 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD2(GetUpdateUrls,
void(const std::string& service_type,
EndpointUrls& out_end_points));
- MOCK_METHOD0(RequestPTUpdate, bool());
+ MOCK_METHOD1(RequestPTUpdate,
+ bool(const policy::PTUIterationType iteration_type));
MOCK_METHOD5(CheckPermissions,
void(const PTString& app_id,
const PTString& hmi_level,
@@ -102,7 +103,8 @@ class MockPolicyManager : public PolicyManager {
MOCK_METHOD0(IncrementIgnitionCycles, void());
MOCK_METHOD0(ForcePTExchange, std::string());
MOCK_METHOD0(ForcePTExchangeAtUserRequest, std::string());
- MOCK_METHOD0(ResetRetrySequence, void());
+ MOCK_METHOD1(ResetRetrySequence,
+ void(const policy::ResetRetryCountType send_event));
MOCK_METHOD0(NextRetryTimeout, uint32_t());
MOCK_METHOD0(TimeoutExchangeMSec, uint32_t());
MOCK_METHOD0(RetrySequenceDelaysSeconds, const std::vector<int>());
diff --git a/src/components/include/test/protocol_handler/mock_protocol_handler.h b/src/components/include/test/protocol_handler/mock_protocol_handler.h
index 772b63b582..354c797c24 100644
--- a/src/components/include/test/protocol_handler/mock_protocol_handler.h
+++ b/src/components/include/test/protocol_handler/mock_protocol_handler.h
@@ -67,8 +67,12 @@ class MockProtocolHandler : public ::protocol_handler::ProtocolHandler {
MOCK_METHOD2(NotifySessionStarted,
void(const ::protocol_handler::SessionContext& context,
std::vector<std::string>& rejected_params));
- MOCK_METHOD0(NotifyOnFailedHandshake, void());
+ MOCK_METHOD0(NotifyOnGetSystemTimeFailed, void());
MOCK_CONST_METHOD1(IsRPCServiceSecure, bool(const uint32_t connection_key));
+ MOCK_METHOD0(ProcessFailedPTU, void());
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ MOCK_METHOD0(ProcessFailedCertDecrypt, void());
+#endif
};
} // namespace protocol_handler_test
} // namespace components
diff --git a/src/components/include/test/security_manager/mock_security_manager.h b/src/components/include/test/security_manager/mock_security_manager.h
index 2b5d99c156..e44d6207c1 100644
--- a/src/components/include/test/security_manager/mock_security_manager.h
+++ b/src/components/include/test/security_manager/mock_security_manager.h
@@ -68,11 +68,16 @@ class MockSecurityManager : public ::security_manager::SecurityManager {
void(const ::protocol_handler::RawMessagePtr));
MOCK_METHOD1(IsCertificateUpdateRequired, bool(const uint32_t));
MOCK_METHOD0(NotifyOnCertificateUpdateRequired, void());
- MOCK_METHOD0(NotifyListenersOnHandshakeFailed, void());
+ MOCK_METHOD0(NotifyListenersOnGetSystemTimeFailed, void());
MOCK_METHOD0(IsPolicyCertificateDataEmpty, bool());
+ MOCK_METHOD0(ProcessFailedPTU, void());
MOCK_METHOD1(OnCertificateUpdated, bool(const std::string&));
MOCK_METHOD1(PostponeHandshake, void(const uint32_t));
MOCK_CONST_METHOD0(IsSystemTimeProviderReady, bool());
+ MOCK_METHOD0(ResetPendingSystemTimeRequests, void());
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ MOCK_METHOD0(ProcessFailedCertDecrypt, void());
+#endif
};
/*
diff --git a/src/components/include/test/security_manager/mock_security_manager_listener.h b/src/components/include/test/security_manager/mock_security_manager_listener.h
index 7a7714d299..81790d1830 100644
--- a/src/components/include/test/security_manager/mock_security_manager_listener.h
+++ b/src/components/include/test/security_manager/mock_security_manager_listener.h
@@ -49,7 +49,11 @@ class MockSecurityManagerListener
::security_manager::SSLContext::HandshakeResult result));
MOCK_METHOD0(OnCertificateUpdateRequired, void());
MOCK_CONST_METHOD1(GetPolicyCertificateData, bool(std::string& data));
- MOCK_METHOD0(OnHandshakeFailed, bool());
+ MOCK_METHOD0(OnGetSystemTimeFailed, bool());
+ MOCK_METHOD0(OnPTUFailed, bool());
+#ifdef EXTERNAL_PROPRIETARY_MODE
+ MOCK_METHOD0(OnCertDecryptFailed, bool());
+#endif
};
} // namespace security_manager_test
} // namespace components
diff --git a/src/components/include/test/utils/mock_system_time_handler.h b/src/components/include/test/utils/mock_system_time_handler.h
index 7bb2a7f0a5..5d82c0a8c7 100644
--- a/src/components/include/test/utils/mock_system_time_handler.h
+++ b/src/components/include/test/utils/mock_system_time_handler.h
@@ -50,6 +50,7 @@ class MockSystemTimeHandler : public ::utils::SystemTimeHandler {
void(utils::SystemTimeListener* listener));
MOCK_METHOD0(GetUTCTime, time_t());
MOCK_CONST_METHOD0(system_time_can_be_received, bool());
+ MOCK_METHOD0(ResetPendingSystemTimeRequests, void());
~MockSystemTimeHandler() {}
private: