represents the PIB More...
#include <pib.hpp>
Classes | |
class | Error |
represents a semantic error More... | |
Public Member Functions | |
~Pib () | |
std::string | getScheme () const |
return the scheme of the PibLocator More... | |
std::string | getPibLocator () const |
Get PIB Locator. More... | |
void | setTpmLocator (const std::string &tpmLocator) |
Set the corresponding TPM information to tpmLocator . More... | |
std::string | getTpmLocator () const |
Get TPM Locator. More... | |
Identity | getIdentity (const Name &identityName) const |
Get an identity with name identityName . More... | |
const IdentityContainer & | getIdentities () const |
Get all the identities. More... | |
Identity & | getDefaultIdentity () const |
Get the default identity. More... | |
void | removeIdentity (const Name &identityName) |
Identity & | setDefaultIdentity (const Name &identityName) |
Set an identity with name identityName as the default identity. More... | |
shared_ptr< PibImpl > | getImpl () |
Public Attributes | |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE | __pad0__: Identity addIdentity(const Name& identityName) |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE | __pad1__: Pib(const std::string scheme |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const std::string & | location |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const std::string shared_ptr< PibImpl > | impl |
Protected Attributes | |
std::string | m_scheme |
std::string | m_location |
bool | m_hasDefaultIdentity |
Identity | m_defaultIdentity |
bool | m_needRefreshIdentities |
IdentityContainer | m_identities |
shared_ptr< PibImpl > | m_impl |
Friends | |
class | KeyChain |
represents the PIB
The PIB (Public Information Base) stores the public portion of a user's cryptography keys. The format and location of stored information is indicated by the PibLocator. The PIB is designed to work with a TPM (Trusted Platform Module) which stores private keys. There is a one-to-one association between PIB and TPM, and therefore the TpmLocator is recorded by the PIB to enforce this association and prevent one from operating on mismatched PIB and TPM.
Information in the PIB is organized in a hierarchy of Identity-Key-Certificate. At the top level, the Pib class provides access to identities, and allows setting a default identity. Properties of an identity can be accessed after obtaining an Identity object.
PibImpl::Error | when underlying implementation has non-semantic error. |
|
inline |
std::string ndn::security::Pib::getPibLocator | ( | ) | const |
void ndn::security::Pib::setTpmLocator | ( | const std::string & | tpmLocator | ) |
std::string ndn::security::Pib::getTpmLocator | ( | ) | const |
Get an identity with name identityName
.
identityName | The name for the identity to get. |
Pib::Error | if the identity does not exist. |
Definition at line 81 of file pib.cpp.
References m_impl.
const IdentityContainer & ndn::security::Pib::getIdentities | ( | ) | const |
Get all the identities.
Definition at line 87 of file pib.cpp.
References m_identities, m_impl, and m_needRefreshIdentities.
Identity & ndn::security::Pib::getDefaultIdentity | ( | ) | const |
Get the default identity.
Pib::Error | if no default identity. |
Definition at line 108 of file pib.cpp.
References m_defaultIdentity, m_hasDefaultIdentity, and m_impl.
void ndn::security::Pib::removeIdentity | ( | const Name & | identityName | ) |
Definition at line 71 of file pib.cpp.
References ndn::security::Identity::getName(), m_defaultIdentity, m_hasDefaultIdentity, m_impl, and m_needRefreshIdentities.
Set an identity with name identityName
as the default identity.
Also create the identity if it does not exist.
identityName | The name for the default identity. |
Definition at line 98 of file pib.cpp.
References m_defaultIdentity, m_hasDefaultIdentity, and m_impl.
|
inline |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::Pib::__pad0__ |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::Pib::__pad1__ |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const std::string& ndn::security::Pib::location |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const std::string shared_ptr<PibImpl> ndn::security::Pib::impl |
|
protected |
Definition at line 172 of file pib.hpp.
Referenced by getPibLocator(), and getScheme().
|
protected |
Definition at line 173 of file pib.hpp.
Referenced by getPibLocator().
|
mutableprotected |
Definition at line 175 of file pib.hpp.
Referenced by getDefaultIdentity(), removeIdentity(), and setDefaultIdentity().
|
mutableprotected |
Definition at line 176 of file pib.hpp.
Referenced by getDefaultIdentity(), removeIdentity(), and setDefaultIdentity().
|
mutableprotected |
Definition at line 178 of file pib.hpp.
Referenced by getIdentities(), and removeIdentity().
|
mutableprotected |
Definition at line 179 of file pib.hpp.
Referenced by getIdentities().
|
protected |
Definition at line 181 of file pib.hpp.
Referenced by getDefaultIdentity(), getIdentities(), getIdentity(), getImpl(), getTpmLocator(), removeIdentity(), setDefaultIdentity(), and setTpmLocator().