IBR-DTNSuite
0.12
|
#include <SecurityKeyManager.h>
Classes | |
class | KeyNotFoundException |
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 (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 39 of file SecurityKeyManager.h.
|
virtual |
Definition at line 49 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 91 of file SecurityKeyManager.cpp.
References ibrcommon::File::exists(), dtn::security::SecurityKey::file, ibrcommon::File::get(), dtn::daemon::Configuration::Security::getBABDefaultKey(), dtn::daemon::Configuration::getInstance(), dtn::data::EID::getNode(), ibrcommon::File::getPath(), dtn::daemon::Configuration::getSecurity(), IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, 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, dtn::security::SecurityKey::type, and ibrcommon::LogLevel::warning.
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().
|
static |
Definition at line 39 of file SecurityKeyManager.cpp.
Referenced by dtn::security::SecurityManager::auth(), dtn::security::SecurityManager::decrypt(), dtn::security::SecurityManager::encrypt(), dtn::daemon::NativeDaemon::setConfigFile(), 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 85 of file SecurityKeyManager.cpp.
References ibrcommon::File::exists(), ibrcommon::File::get(), and dtn::data::EID::getNode().
|
virtual |
Listen for changes of the configuration
Implements dtn::daemon::Configuration::OnChangeListener.
Definition at line 53 of file SecurityKeyManager.cpp.
References dtn::daemon::Configuration::Security::enabled(), dtn::daemon::Configuration::Security::getCertificate(), dtn::daemon::Configuration::Security::getKey(), ibrcommon::File::getPath(), dtn::daemon::Configuration::Security::getPath(), IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, and ibrcommon::LogLevel::info.
Referenced by dtn::daemon::NativeDaemon::setConfigFile().
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 147 of file SecurityKeyManager.cpp.
References ibrcommon::File::exists(), ibrcommon::File::get(), dtn::data::EID::getNode(), ibrcommon::File::getPath(), and ibrcommon::File::remove().