IBR-DTN  1.0.0
dtn::daemon::Configuration::Security Class Reference

#include <Configuration.h>

Inheritance diagram for dtn::daemon::Configuration::Security:
Inheritance graph
Collaboration diagram for dtn::daemon::Configuration::Security:
Collaboration graph

Public Types

enum  Level { SECURITY_LEVEL_NONE = 0, SECURITY_LEVEL_AUTHENTICATED = 1, SECURITY_LEVEL_ENCRYPTED = 2, SECURITY_LEVEL_SIGNED = 4 }
 

Public Member Functions

bool enabled () const
 
bool doTLS () const
 checks if TLS shall be activated More...
 
bool TLSRequired () const
 Checks if TLS is required. More...
 
int getLevel () const
 
const ibrcommon::File & getPath () const
 
const ibrcommon::File & getBABDefaultKey () const
 
const ibrcommon::File & getCertificate () const
 
const ibrcommon::File & getKey () const
 
const ibrcommon::File & getTrustedCAPath () const
 Read the path for trusted Certificates from the Configuration. More...
 
bool TLSEncryptionDisabled () const
 Checks if Encryption in TLS shall be disabled. More...
 
bool isGenerateDHParamsEnabled () const
 Generate DH parameters automatically if necessary. More...
 

Protected Member Functions

 Security ()
 
virtual ~Security ()
 
void load (const ibrcommon::ConfigFile &conf)
 

Friends

class Configuration
 

Detailed Description

Definition at line 418 of file Configuration.h.

Member Enumeration Documentation

Enumerator
SECURITY_LEVEL_NONE 
SECURITY_LEVEL_AUTHENTICATED 
SECURITY_LEVEL_ENCRYPTED 
SECURITY_LEVEL_SIGNED 

Definition at line 451 of file Configuration.h.

Constructor & Destructor Documentation

dtn::daemon::Configuration::Security::Security ( )
protected

Definition at line 99 of file Configuration.cpp.

dtn::daemon::Configuration::Security::~Security ( )
protectedvirtual

Definition at line 1210 of file Configuration.cpp.

Member Function Documentation

bool dtn::daemon::Configuration::Security::doTLS ( ) const

checks if TLS shall be activated

Returns
true if TLS is requested, false otherwise If TLS is requested, the TCP Convergence Layer Contact Header has the most significant bit of the flags field set to 1. If both peers support it, a TLS Handshake is executed.

Definition at line 1217 of file Configuration.cpp.

bool dtn::daemon::Configuration::Security::enabled ( ) const
const ibrcommon::File & dtn::daemon::Configuration::Security::getBABDefaultKey ( ) const

Get the path to the default BAB key

Definition at line 1239 of file Configuration.cpp.

Referenced by dtn::security::SecurityKeyManager::get().

const ibrcommon::File & dtn::daemon::Configuration::Security::getCertificate ( ) const

Get the path to the TLS certificate

Definition at line 1244 of file Configuration.cpp.

Referenced by dtn::security::SecurityKeyManager::onConfigurationChanged().

const ibrcommon::File & dtn::daemon::Configuration::Security::getKey ( ) const

Get the path to the private TLS key

Definition at line 1249 of file Configuration.cpp.

Referenced by dtn::security::SecurityKeyManager::onConfigurationChanged().

int dtn::daemon::Configuration::Security::getLevel ( ) const

Get the configured security level

Definition at line 1234 of file Configuration.cpp.

const ibrcommon::File & dtn::daemon::Configuration::Security::getPath ( ) const

Get the path to security related files

Definition at line 1229 of file Configuration.cpp.

Referenced by dtn::security::SecurityKeyManager::onConfigurationChanged().

const ibrcommon::File & dtn::daemon::Configuration::Security::getTrustedCAPath ( ) const

Read the path for trusted Certificates from the Configuration.

Returns
A file object for the path

Definition at line 1254 of file Configuration.cpp.

bool dtn::daemon::Configuration::Security::isGenerateDHParamsEnabled ( ) const

Generate DH parameters automatically if necessary.

Returns
true if the DH parameters shall be generated automatically, false otherwise

Definition at line 1264 of file Configuration.cpp.

Referenced by dtn::security::DHProtocol::DHProtocol().

void dtn::daemon::Configuration::Security::load ( const ibrcommon::ConfigFile &  conf)
protectedvirtual
bool dtn::daemon::Configuration::Security::TLSEncryptionDisabled ( ) const

Checks if Encryption in TLS shall be disabled.

Returns
true if encryption shall be disabled, false otherwise

Definition at line 1259 of file Configuration.cpp.

bool dtn::daemon::Configuration::Security::TLSRequired ( ) const

Checks if TLS is required.

Returns
true if TLS is required, false otherwise If TLS is required, this node should abort TCP Convergence Layer Connections immediately if TLS is not available or fails

Definition at line 1222 of file Configuration.cpp.

References dtn::utils::Clock::getRating().

Referenced by dtn::net::TCPConnection::initiateExtendedHandshake().

Here is the call graph for this function:

Friends And Related Function Documentation

friend class Configuration
friend

Definition at line 420 of file Configuration.h.


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