IBR-DTNSuite
0.10
|
This class is a manager to handle certificates. More...
#include <SecurityCertificateManager.h>
Public Member Functions | |
SecurityCertificateManager () | |
virtual | ~SecurityCertificateManager () |
virtual void | onConfigurationChanged (const dtn::daemon::Configuration &conf) throw () |
bool | isInitialized () |
checks if this class has already been initialized with a certificate and private key More... | |
const X509 * | getCert () const |
retrieve the saved certificate More... | |
const EVP_PKEY * | getPrivateKey () const |
retrieve the saved private key More... | |
const ibrcommon::File & | getTrustedCAPath () const |
retrieve the saved directory holding trusted certificates More... | |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
virtual const std::string | getName () const |
![]() | |
virtual | ~Component ()=0 |
Static Public Member Functions | |
static void | validateSubject (X509 *certificate, const std::string &cn) throw (SecurityCertificateException) |
Validates if the CommonName in the given X509 certificate corresponds to the given EID. More... | |
Static Public Attributes | |
static const std::string | TAG = "SecurityCertificateManager" |
This class is a manager to handle certificates.
Definition at line 53 of file SecurityCertificateManager.h.
dtn::security::SecurityCertificateManager::SecurityCertificateManager | ( | ) |
Definition at line 36 of file SecurityCertificateManager.cpp.
|
virtual |
Definition at line 41 of file SecurityCertificateManager.cpp.
const X509 * dtn::security::SecurityCertificateManager::getCert | ( | ) | const |
retrieve the saved certificate
Definition at line 49 of file SecurityCertificateManager.cpp.
|
virtual |
Return an identifier for this component
Implements dtn::daemon::Component.
Definition at line 142 of file SecurityCertificateManager.cpp.
References TAG.
const EVP_PKEY * dtn::security::SecurityCertificateManager::getPrivateKey | ( | ) | const |
retrieve the saved private key
Definition at line 54 of file SecurityCertificateManager.cpp.
const ibrcommon::File & dtn::security::SecurityCertificateManager::getTrustedCAPath | ( | ) | const |
retrieve the saved directory holding trusted certificates
Definition at line 59 of file SecurityCertificateManager.cpp.
|
virtual |
Set up the component. At this stage no other components should be used.
Implements dtn::daemon::Component.
Definition at line 112 of file SecurityCertificateManager.cpp.
References dtn::daemon::Configuration::getInstance(), IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::LogLevel::info, onConfigurationChanged(), and TAG.
bool dtn::security::SecurityCertificateManager::isInitialized | ( | ) |
checks if this class has already been initialized with a certificate and private key
Definition at line 44 of file SecurityCertificateManager.cpp.
|
virtual |
Listen for changes of the configuration
Implements dtn::daemon::Configuration::OnChangeListener.
Definition at line 64 of file SecurityCertificateManager.cpp.
References ibrcommon::LogLevel::error, ibrcommon::File::getPath(), IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::File::isDirectory(), and TAG.
Referenced by initialize().
|
virtual |
Start up the component. At this stage all other components are ready.
Implements dtn::daemon::Component.
Definition at line 128 of file SecurityCertificateManager.cpp.
References dtn::daemon::Configuration::getInstance(), and ibrcommon::TLSStream::init().
|
virtual |
Terminate the component and do some cleanup stuff. All other components still exists, but may not serve signals.
Implements dtn::daemon::Component.
Definition at line 136 of file SecurityCertificateManager.cpp.
|
static |
Validates if the CommonName in the given X509 certificate corresponds to the given EID.
certificate | The Certificate. |
eid | The EID of the sender. |
Definition at line 148 of file SecurityCertificateManager.cpp.
References ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, and TAG.
Referenced by dtn::net::TCPConnection::initiateExtendedHandshake().
|
static |
Definition at line 55 of file SecurityCertificateManager.h.
Referenced by getName(), initialize(), onConfigurationChanged(), and validateSubject().