From d656eb202c2c1060adf2e700bc2719f131d9f8bb Mon Sep 17 00:00:00 2001 From: Alexandr Galiuzov Date: Wed, 9 Sep 2015 16:05:18 +0300 Subject: Trigger update in case of certificate to be expired In case when certificate from policy table will be expired in less then defined in config file hours amount the PTU will be triggered. Closes-Issue:APPLINK-12302 --- src/components/include/security_manager/security_manager.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/components/include/security_manager/security_manager.h') diff --git a/src/components/include/security_manager/security_manager.h b/src/components/include/security_manager/security_manager.h index 252ec610a8..97b1ffc065 100644 --- a/src/components/include/security_manager/security_manager.h +++ b/src/components/include/security_manager/security_manager.h @@ -40,10 +40,11 @@ #include "protocol_handler/protocol_observer.h" #include "protocol_handler/session_observer.h" -#include "security_manager/crypto_manager.h" #include "security_manager/security_manager_listener.h" namespace security_manager { + +class CryptoManager; /** * \brief SecurityManager interface implements protocol_handler::ProtocolObserver * and provide interface for handling Security queries from mobile side @@ -67,7 +68,7 @@ class SecurityManager ERROR_ENCRYPTION_FAILED = 0x07, ERROR_SSL_INVALID_DATA = 0x08, ERROR_INTERNAL = 0xFF, - ERROR_UNKWOWN_INTERNAL_ERROR = 0xFE // error valeu for testing + ERROR_UNKNOWN_INTERNAL_ERROR = 0xFE // error value for testing }; /** * \brief Sets pointer for Connection Handler layer for managing sessions -- cgit v1.2.1 From 4ecdb2a83871784f34430ed09d5ef6a2c0855506 Mon Sep 17 00:00:00 2001 From: Kozoriz Date: Tue, 26 Apr 2016 12:41:54 +0300 Subject: Format all code in project Formated all code in appMain, components, plugins to correct coding-style Used clang-format-3.6 Used 2 commands : find src/appMain/ -name "*.h" -o -name "*.cc" -o -name "*.hpp" -o -name "*.cpp" | xargs clang-format-3.6 -i -style=file find src/components/ -name "*.h" -o -name "*.cc" -o -name "*.hpp" -o -name "*.cpp" | xargs clang-format-3.6 -i -style=file find src/plugins/ -name "*.h" -o -name "*.cc" -o -name "*.hpp" -o -name "*.cpp" | xargs clang-format-3.6 -i -style=file --- .../include/security_manager/security_manager.h | 57 ++++++++++++---------- 1 file changed, 30 insertions(+), 27 deletions(-) (limited to 'src/components/include/security_manager/security_manager.h') diff --git a/src/components/include/security_manager/security_manager.h b/src/components/include/security_manager/security_manager.h index 97b1ffc065..8ed0ff2912 100644 --- a/src/components/include/security_manager/security_manager.h +++ b/src/components/include/security_manager/security_manager.h @@ -46,78 +46,81 @@ namespace security_manager { class CryptoManager; /** - * \brief SecurityManager interface implements protocol_handler::ProtocolObserver + * \brief SecurityManager interface implements + * protocol_handler::ProtocolObserver * and provide interface for handling Security queries from mobile side */ -class SecurityManager - : public protocol_handler::ProtocolObserver { +class SecurityManager : public protocol_handler::ProtocolObserver { public: /** * \brief InternalErrors is 1 byte identifier of internal error * Handle as binary data in Ford Protocol */ enum InternalErrors { - ERROR_SUCCESS = 0x00, - ERROR_INVALID_QUERY_SIZE = 0x01, // wrong size of query data - ERROR_INVALID_QUERY_ID = 0x02, // unknown query id - ERROR_NOT_SUPPORTED = 0x03, // SDL does not support encryption - ERROR_SERVICE_ALREADY_PROTECTED = 0x04, - ERROR_SERVICE_NOT_PROTECTED = 0x05, // got handshake or encrypted data + ERROR_SUCCESS = 0x00, + ERROR_INVALID_QUERY_SIZE = 0x01, // wrong size of query data + ERROR_INVALID_QUERY_ID = 0x02, // unknown query id + ERROR_NOT_SUPPORTED = 0x03, // SDL does not support encryption + ERROR_SERVICE_ALREADY_PROTECTED = 0x04, + ERROR_SERVICE_NOT_PROTECTED = 0x05, // got handshake or encrypted data // for not protected service - ERROR_DECRYPTION_FAILED = 0x06, - ERROR_ENCRYPTION_FAILED = 0x07, - ERROR_SSL_INVALID_DATA = 0x08, - ERROR_INTERNAL = 0xFF, - ERROR_UNKNOWN_INTERNAL_ERROR = 0xFE // error value for testing + ERROR_DECRYPTION_FAILED = 0x06, + ERROR_ENCRYPTION_FAILED = 0x07, + ERROR_SSL_INVALID_DATA = 0x08, + ERROR_INTERNAL = 0xFF, + ERROR_UNKNOWN_INTERNAL_ERROR = 0xFE // error value for testing }; /** * \brief Sets pointer for Connection Handler layer for managing sessions * \param session_observer pointer to object of the class implementing */ virtual void set_session_observer( - protocol_handler::SessionObserver *observer) = 0; + protocol_handler::SessionObserver* observer) = 0; /** * \brief Sets pointer for Protocol Handler layer for sending * \param protocol_handler pointer to object of the class implementing */ virtual void set_protocol_handler( - protocol_handler::ProtocolHandler *protocol_handler_) = 0; + protocol_handler::ProtocolHandler* protocol_handler_) = 0; /** * \brief Sets pointer for CryptoManager for handling SSLContext * \param crypto_manager pointer to object of the class implementing */ - virtual void set_crypto_manager(CryptoManager *crypto_manager) = 0; + virtual void set_crypto_manager(CryptoManager* crypto_manager) = 0; /** * \brief Sends InternalError with text message to mobile application - * \param connection_key Unique key used by other components as session identifier + * \param connection_key Unique key used by other components as session + * identifier * \param error_id unique error identifier * \param erorr_text SSL impelmentation error text * \param seq_number received from Mobile Application */ virtual void SendInternalError(const uint32_t connection_key, - const uint8_t &error_id, - const std::string &erorr_text, + const uint8_t& error_id, + const std::string& erorr_text, const uint32_t seq_number) = 0; /** * \brief Sends InternalError override methode for sending without seq_number - * \param connection_key Unique key used by other components as session identifier + * \param connection_key Unique key used by other components as session + * identifier * \param error_id unique error identifier * \param erorr_text SSL impelmentation error text */ void SendInternalError(const uint32_t connection_key, - const uint8_t &error_id, - const std::string &erorr_text) { + const uint8_t& error_id, + const std::string& erorr_text) { SendInternalError(connection_key, error_id, erorr_text, 0); } /** * \brief Create new SSLContext for connection or return exists * Do not notify listeners, send security error on occure - * \param connection_key Unique key used by other components as session identifier + * \param connection_key Unique key used by other components as session + * identifier * @return new \c SSLContext or \c NULL on any error */ - virtual SSLContext *CreateSSLContext(const uint32_t &connection_key) = 0; + virtual SSLContext* CreateSSLContext(const uint32_t& connection_key) = 0; /** * \brief Start handshake as SSL client @@ -127,8 +130,8 @@ class SecurityManager /** * \brief Add/Remove for SecurityManagerListener */ - virtual void AddListener(SecurityManagerListener *const listener) = 0; - virtual void RemoveListener(SecurityManagerListener *const listener) = 0; + virtual void AddListener(SecurityManagerListener* const listener) = 0; + virtual void RemoveListener(SecurityManagerListener* const listener) = 0; }; } // namespace security_manager #endif // SRC_COMPONENTS_INCLUDE_SECURITY_MANAGER_SECURITY_MANAGER_H_ -- cgit v1.2.1