IBR-DTNSuite
0.8
|
This class is a manager to handle certificates. More...
#include <SecurityCertificateManager.h>
Public Member Functions | |
SecurityCertificateManager () | |
virtual | ~SecurityCertificateManager () |
bool | isInitialized () |
checks if this class has already been initialized with a certificate and private key | |
X509 * | getCert () |
retrieve the saved certificate | |
EVP_PKEY * | getPrivateKey () |
retrieve the saved private key | |
ibrcommon::File | getTrustedCAPath () const |
retrieve the saved directory holding trusted certificates | |
virtual void | initialize () |
virtual void | startup () |
virtual void | terminate () |
virtual const std::string | getName () const |
Static Public Member Functions | |
static bool | validateSubject (X509 *certificate, const dtn::data::EID &eid) |
Validates if the CommonName in the given X509 certificate corresponds to the given EID. |
This class is a manager to handle certificates.
Definition at line 58 of file SecurityCertificateManager.h.
Definition at line 19 of file SecurityCertificateManager.cpp.
Definition at line 24 of file SecurityCertificateManager.cpp.
retrieve the saved certificate
Definition at line 32 of file SecurityCertificateManager.cpp.
const std::string dtn::security::SecurityCertificateManager::getName | ( | ) | const [virtual] |
Return an identifier for this component
Implements dtn::daemon::Component.
Definition at line 115 of file SecurityCertificateManager.cpp.
EVP_PKEY * dtn::security::SecurityCertificateManager::getPrivateKey | ( | ) |
retrieve the saved private key
Definition at line 37 of file SecurityCertificateManager.cpp.
retrieve the saved directory holding trusted certificates
Definition at line 42 of file SecurityCertificateManager.cpp.
void dtn::security::SecurityCertificateManager::initialize | ( | ) | [virtual] |
Set up the component. At this stage no other components should be used.
Implements dtn::daemon::Component.
Definition at line 48 of file SecurityCertificateManager.cpp.
References dtn::daemon::Configuration::getInstance(), ibrcommon::File::getPath(), dtn::daemon::Configuration::getSecurity(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, and ibrcommon::File::isDirectory().
checks if this class has already been initialized with a certificate and private key
Definition at line 27 of file SecurityCertificateManager.cpp.
void dtn::security::SecurityCertificateManager::startup | ( | ) | [virtual] |
Start up the component. At this stage all other components are ready.
Implements dtn::daemon::Component.
Definition at line 101 of file SecurityCertificateManager.cpp.
References dtn::security::CertificateManagerInitEvent::raise().
void dtn::security::SecurityCertificateManager::terminate | ( | ) | [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 109 of file SecurityCertificateManager.cpp.
bool dtn::security::SecurityCertificateManager::validateSubject | ( | X509 * | certificate, |
const dtn::data::EID & | eid | ||
) | [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 121 of file SecurityCertificateManager.cpp.
References dtn::data::EID::getString(), IBRCOMMON_LOGGER, and IBRCOMMON_LOGGER_ENDL.
Referenced by dtn::net::TCPConnection::eventConnectionUp().