IBR-DTNSuite  0.8
dtn::security::SecurityCertificateManager Class Reference

This class is a manager to handle certificates. More...

#include <SecurityCertificateManager.h>

Inheritance diagram for dtn::security::SecurityCertificateManager:
Collaboration diagram for dtn::security::SecurityCertificateManager:

List of all members.

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.

Detailed Description

This class is a manager to handle certificates.

Definition at line 58 of file SecurityCertificateManager.h.


Constructor & Destructor Documentation


Member Function Documentation

retrieve the saved certificate

Returns:
The certificate.
Warning:
Check isInitialized() first, before calling this function

Definition at line 32 of file SecurityCertificateManager.cpp.

const std::string dtn::security::SecurityCertificateManager::getName ( ) const [virtual]

Return an identifier for this component

Returns:

Implements dtn::daemon::Component.

Definition at line 115 of file SecurityCertificateManager.cpp.

retrieve the saved private key

Returns:
The private key as an EVP_PKEY pointer (OpenSSL).
Warning:
Check isInitialized() first, before calling this function

Definition at line 37 of file SecurityCertificateManager.cpp.

retrieve the saved directory holding trusted certificates

Returns:
The directory

Definition at line 42 of file SecurityCertificateManager.cpp.

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().

Here is the call graph for this function:

checks if this class has already been initialized with a certificate and private key

Returns:
true if it is initialized, false otherwise

Definition at line 27 of file SecurityCertificateManager.cpp.

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().

Here is the call graph for this function:

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.

Parameters:
certificateThe Certificate.
eidThe EID of the sender.
Returns:
returns true if the EID fits, false otherwise

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().

Here is the call graph for this function:


The documentation for this class was generated from the following files: