IBR-DTNSuite
0.8
|
#include <SecurityKeyManager.h>
Classes | |
class | KeyNotFoundException |
Public Member Functions | |
virtual | ~SecurityKeyManager () |
void | initialize (const ibrcommon::File &path, const ibrcommon::File &ca, const ibrcommon::File &key) |
void | prefetchKey (const dtn::data::EID &ref, const dtn::security::SecurityKey::KeyType type=dtn::security::SecurityKey::KEY_UNSPEC) |
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 (SecurityKeyManager::KeyNotFoundException) |
void | store (const dtn::data::EID &ref, const std::string &data, const dtn::security::SecurityKey::KeyType type=dtn::security::SecurityKey::KEY_UNSPEC) |
Static Public Member Functions | |
static SecurityKeyManager & | getInstance () |
Definition at line 25 of file SecurityKeyManager.h.
dtn::security::SecurityKeyManager::~SecurityKeyManager | ( | ) | [virtual] |
Definition at line 32 of file SecurityKeyManager.cpp.
dtn::security::SecurityKey dtn::security::SecurityKeyManager::get | ( | const dtn::data::EID & | ref, |
const dtn::security::SecurityKey::KeyType | type = dtn::security::SecurityKey::KEY_UNSPEC |
||
) | const throw (SecurityKeyManager::KeyNotFoundException) |
Definition at line 65 of file SecurityKeyManager.cpp.
References ibrcommon::File::exists(), dtn::security::SecurityKey::file, ibrcommon::File::get(), dtn::daemon::Configuration::getInstance(), dtn::data::EID::getNode(), ibrcommon::File::getPath(), dtn::daemon::Configuration::getSecurity(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, dtn::security::SecurityKey::KEY_PRIVATE, dtn::security::SecurityKey::KEY_PUBLIC, dtn::security::SecurityKey::KEY_SHARED, dtn::security::SecurityKey::KEY_UNSPEC, ibrcommon::File::lastmodify(), dtn::security::SecurityKey::lastupdate, dtn::security::SecurityKey::reference, and dtn::security::SecurityKey::type.
Referenced by dtn::security::SecurityManager::auth(), dtn::security::SecurityManager::decrypt(), dtn::security::SecurityManager::encrypt(), dtn::security::SecurityManager::sign(), dtn::security::SecurityManager::verifyBAB(), and dtn::security::SecurityManager::verifyPIB().
SecurityKeyManager & dtn::security::SecurityKeyManager::getInstance | ( | ) | [static] |
Definition at line 22 of file SecurityKeyManager.cpp.
Referenced by __daemon_run(), dtn::security::SecurityManager::auth(), dtn::security::SecurityManager::decrypt(), dtn::security::SecurityManager::encrypt(), dtn::security::SecurityManager::sign(), dtn::security::SecurityManager::verifyBAB(), and dtn::security::SecurityManager::verifyPIB().
bool dtn::security::SecurityKeyManager::hasKey | ( | const dtn::data::EID & | ref, |
const dtn::security::SecurityKey::KeyType | type = dtn::security::SecurityKey::KEY_UNSPEC |
||
) | const |
Definition at line 59 of file SecurityKeyManager.cpp.
References ibrcommon::File::exists(), ibrcommon::File::get(), and dtn::data::EID::getNode().
void dtn::security::SecurityKeyManager::initialize | ( | const ibrcommon::File & | path, |
const ibrcommon::File & | ca, | ||
const ibrcommon::File & | key | ||
) |
Definition at line 36 of file SecurityKeyManager.cpp.
References ibrcommon::File::getPath(), IBRCOMMON_LOGGER, and IBRCOMMON_LOGGER_ENDL.
Referenced by __daemon_run().
void dtn::security::SecurityKeyManager::prefetchKey | ( | const dtn::data::EID & | ref, |
const dtn::security::SecurityKey::KeyType | type = dtn::security::SecurityKey::KEY_UNSPEC |
||
) |
Definition at line 55 of file SecurityKeyManager.cpp.
void dtn::security::SecurityKeyManager::store | ( | const dtn::data::EID & | ref, |
const std::string & | data, | ||
const dtn::security::SecurityKey::KeyType | type = dtn::security::SecurityKey::KEY_UNSPEC |
||
) |
Definition at line 121 of file SecurityKeyManager.cpp.
References ibrcommon::File::exists(), ibrcommon::File::get(), dtn::data::EID::getNode(), ibrcommon::File::getPath(), and ibrcommon::File::remove().