From a16f649a36ac28304cb907c8c06621ca62b14123 Mon Sep 17 00:00:00 2001 From: Aleksandr Galiuzov Date: Mon, 5 Oct 2015 01:28:33 +0300 Subject: Implement function which allows to notify about certificate expiration --- .../include/security_manager/security_manager_impl.h | 7 +++++++ src/components/security_manager/src/security_manager_impl.cc | 9 +++++++++ 2 files changed, 16 insertions(+) (limited to 'src/components') diff --git a/src/components/security_manager/include/security_manager/security_manager_impl.h b/src/components/security_manager/include/security_manager/security_manager_impl.h index e9fba93681..329d84b3ca 100644 --- a/src/components/security_manager/include/security_manager/security_manager_impl.h +++ b/src/components/security_manager/include/security_manager/security_manager_impl.h @@ -150,6 +150,13 @@ class SecurityManagerImpl */ void NotifyListenersOnHandshakeDone(const uint32_t &connection_key, SSLContext::HandshakeResult error); + + /** + * @brief Notifiers for listeners. + * Allows to notify that certificate should be updated + */ + void NotifyOnCertififcateUpdateRequired(); + /** * @brief SecurityConfigSection * @return Session name in config file diff --git a/src/components/security_manager/src/security_manager_impl.cc b/src/components/security_manager/src/security_manager_impl.cc index ab047a7a41..a8d247cbf1 100644 --- a/src/components/security_manager/src/security_manager_impl.cc +++ b/src/components/security_manager/src/security_manager_impl.cc @@ -247,6 +247,15 @@ void SecurityManagerImpl::NotifyListenersOnHandshakeDone( } } +void SecurityManagerImpl::NotifyOnCertififcateUpdateRequired() { + LOG4CXX_AUTO_TRACE(logger_); + std::list::iterator it = listeners_.begin(); + while (it != listeners_.end()) { + (*it)->OnCertificateUpdateRequired(); + ++it; + } +} + bool SecurityManagerImpl::ProccessHandshakeData(const SecurityMessage &inMessage) { LOG4CXX_INFO(logger_, "SendHandshakeData processing"); DCHECK(inMessage); -- cgit v1.2.1