IBR-DTN  1.0.0
dtn::security::SecurityKeyManager Class Reference

#include <SecurityKeyManager.h>

Inheritance diagram for dtn::security::SecurityKeyManager:
Inheritance graph
Collaboration diagram for dtn::security::SecurityKeyManager:
Collaboration graph

Classes

class  PathNotFoundException
 

Public Member Functions

virtual ~SecurityKeyManager ()
 
virtual void onConfigurationChanged (const dtn::daemon::Configuration &conf) throw ()
 
bool hasKey (const dtn::data::EID &ref, const dtn::security::SecurityKey::KeyType type=dtn::security::SecurityKey::KEY_UNSPEC) const
 
dtn::security::SecurityKey get (const dtn::data::EID &ref, const dtn::security::SecurityKey::KeyType type=dtn::security::SecurityKey::KEY_UNSPEC) const throw (SecurityKey::KeyNotFoundException)
 
dtn::security::SecurityKey get (const std::string &prefix, const dtn::data::EID &ref, const dtn::security::SecurityKey::KeyType type=dtn::security::SecurityKey::KEY_UNSPEC) const throw (SecurityKey::KeyNotFoundException)
 
void store (const dtn::security::SecurityKey &key, const std::string &data)
 
void store (const std::string &prefix, const dtn::security::SecurityKey &key, const std::string &data)
 
void store (const dtn::security::SecurityKey &key)
 
const ibrcommon::File getKeyFile (const std::string &prefix, const dtn::data::EID &peer, const dtn::security::SecurityKey::KeyType type=dtn::security::SecurityKey::KEY_UNSPEC) const
 
const ibrcommon::File getKeyFile (const dtn::data::EID &peer, const dtn::security::SecurityKey::KeyType type=dtn::security::SecurityKey::KEY_UNSPEC) const
 
const ibrcommon::File getFilePath (const std::string &keyword, const std::string &extension) const
 
void remove (const SecurityKey &key)
 

Static Public Member Functions

static SecurityKeyManagergetInstance ()
 

Detailed Description

Definition at line 37 of file SecurityKeyManager.h.

Constructor & Destructor Documentation

dtn::security::SecurityKeyManager::~SecurityKeyManager ( )
virtual

Definition at line 52 of file SecurityKeyManager.cpp.

Member Function Documentation

dtn::security::SecurityKey dtn::security::SecurityKeyManager::get ( const std::string &  prefix,
const dtn::data::EID ref,
const dtn::security::SecurityKey::KeyType  type = dtn::security::SecurityKey::KEY_UNSPEC 
) const
throw (SecurityKey::KeyNotFoundException
)

Get a security key from the prefixed path

Definition at line 152 of file SecurityKeyManager.cpp.

References dtn::security::SecurityKey::file, dtn::data::EID::getNode(), dtn::security::SecurityKey::reference, and dtn::security::SecurityKey::type.

Here is the call graph for this function:

const ibrcommon::File dtn::security::SecurityKeyManager::getFilePath ( const std::string &  keyword,
const std::string &  extension 
) const

Returns the path to a security related file based on the keyword.

Definition at line 294 of file SecurityKeyManager.cpp.

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

const ibrcommon::File dtn::security::SecurityKeyManager::getKeyFile ( const std::string &  prefix,
const dtn::data::EID peer,
const dtn::security::SecurityKey::KeyType  type = dtn::security::SecurityKey::KEY_UNSPEC 
) const

Returns the prefixes path to the key of given type

Definition at line 276 of file SecurityKeyManager.cpp.

References dtn::security::SecurityKey::KEY_PRIVATE, dtn::security::SecurityKey::KEY_PUBLIC, and dtn::security::SecurityKey::KEY_SHARED.

Referenced by hasKey(), and store().

const ibrcommon::File dtn::security::SecurityKeyManager::getKeyFile ( const dtn::data::EID peer,
const dtn::security::SecurityKey::KeyType  type = dtn::security::SecurityKey::KEY_UNSPEC 
) const

Returns the path to the key of given type

Definition at line 258 of file SecurityKeyManager.cpp.

References dtn::security::SecurityKey::KEY_PRIVATE, dtn::security::SecurityKey::KEY_PUBLIC, and dtn::security::SecurityKey::KEY_SHARED.

bool dtn::security::SecurityKeyManager::hasKey ( const dtn::data::EID ref,
const dtn::security::SecurityKey::KeyType  type = dtn::security::SecurityKey::KEY_UNSPEC 
) const

Checks if a security key exists

Definition at line 102 of file SecurityKeyManager.cpp.

References getKeyFile().

Here is the call graph for this function:

void dtn::security::SecurityKeyManager::remove ( const SecurityKey key)

Remove a security key

Definition at line 248 of file SecurityKeyManager.cpp.

References dtn::security::SecurityKey::file, and dtn::security::SecurityKey::getMetaFilename().

Referenced by dtn::security::KeyExchangeSession::clearKeys(), and dtn::daemon::NativeDaemon::removeKey().

Here is the call graph for this function:

void dtn::security::SecurityKeyManager::store ( const dtn::security::SecurityKey key,
const std::string &  data 
)
void dtn::security::SecurityKeyManager::store ( const std::string &  prefix,
const dtn::security::SecurityKey key,
const std::string &  data 
)

Store a security key in the prefixed path

Definition at line 232 of file SecurityKeyManager.cpp.

References dtn::security::SecurityKey::file, getKeyFile(), dtn::security::SecurityKey::getMetaFilename(), dtn::security::SecurityKey::reference, and dtn::security::SecurityKey::type.

Here is the call graph for this function:

void dtn::security::SecurityKeyManager::store ( const dtn::security::SecurityKey key)

Store a security key object in the standard key path

Definition at line 206 of file SecurityKeyManager.cpp.

References dtn::security::SecurityKey::file, and store().

Here is the call graph for this function:


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