NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::Pib Class Reference

represents the PIB More...

#include <pib.hpp>

Inheritance diagram for ndn::security::Pib:
Collaboration diagram for ndn::security::Pib:

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 IdentityContainergetIdentities () const
 Get all the identities. More...
 
IdentitygetDefaultIdentity () const
 Get the default identity. More...
 
void removeIdentity (const Name &identityName)
 
IdentitysetDefaultIdentity (const Name &identityName)
 Set an identity with name identityName as the default identity. More...
 
shared_ptr< PibImplgetImpl ()
 

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< PibImplimpl
 

Protected Attributes

std::string m_scheme
 
std::string m_location
 
bool m_hasDefaultIdentity
 
Identity m_defaultIdentity
 
bool m_needRefreshIdentities
 
IdentityContainer m_identities
 
shared_ptr< PibImplm_impl
 

Friends

class KeyChain
 

Detailed Description

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.

Exceptions
PibImpl::Errorwhen underlying implementation has non-semantic error.

Definition at line 48 of file pib.hpp.

Constructor & Destructor Documentation

§ ~Pib()

ndn::security::Pib::~Pib ( )

Definition at line 37 of file pib.cpp.

Referenced by ndn::security::Pib::Error::Error().

Member Function Documentation

§ getScheme()

std::string ndn::security::Pib::getScheme ( ) const
inline

§ getPibLocator()

std::string ndn::security::Pib::getPibLocator ( ) const

Get PIB Locator.

Definition at line 42 of file pib.cpp.

Referenced by getScheme().

§ setTpmLocator()

void ndn::security::Pib::setTpmLocator ( const std::string &  tpmLocator)

Set the corresponding TPM information to tpmLocator.

If the provided tpmLocator is different from the existing one, the PIB will be reset, otherwise nothing will be changed.

Parameters
tpmLocatorThe name for the new TPM locator

Definition at line 48 of file pib.cpp.

Referenced by getScheme().

§ getTpmLocator()

std::string ndn::security::Pib::getTpmLocator ( ) const

Get TPM Locator.

Definition at line 54 of file pib.cpp.

Referenced by getScheme().

§ getIdentity()

Identity ndn::security::Pib::getIdentity ( const Name identityName) const

Get an identity with name identityName.

Parameters
identityNameThe name for the identity to get.
Exceptions
Pib::Errorif the identity does not exist.

Definition at line 81 of file pib.cpp.

Referenced by getScheme().

§ getIdentities()

const IdentityContainer & ndn::security::Pib::getIdentities ( ) const

Get all the identities.

Definition at line 87 of file pib.cpp.

Referenced by getScheme().

§ getDefaultIdentity()

Identity & ndn::security::Pib::getDefaultIdentity ( ) const

Get the default identity.

Returns
the default identity.
Exceptions
Pib::Errorif no default identity.

Definition at line 108 of file pib.cpp.

Referenced by getScheme().

§ removeIdentity()

void ndn::security::Pib::removeIdentity ( const Name identityName)

Definition at line 71 of file pib.cpp.

§ setDefaultIdentity()

Identity & ndn::security::Pib::setDefaultIdentity ( const Name identityName)

Set an identity with name identityName as the default identity.

Also create the identity if it does not exist.

Parameters
identityNameThe name for the default identity.
Returns
the default identity

Definition at line 98 of file pib.cpp.

References ndn::security::PibSqlite3::addIdentity().

§ getImpl()

shared_ptr<PibImpl> ndn::security::Pib::getImpl ( )
inline

Definition at line 166 of file pib.hpp.

References m_impl.

Friends And Related Function Documentation

§ KeyChain

friend class KeyChain
friend

Definition at line 51 of file pib.hpp.

Member Data Documentation

§ __pad0__

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::Pib::__pad0__

Definition at line 134 of file pib.hpp.

§ __pad1__

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::Pib::__pad1__

Definition at line 163 of file pib.hpp.

§ location

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const std::string& ndn::security::Pib::location

Definition at line 163 of file pib.hpp.

§ impl

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const std::string shared_ptr<PibImpl> ndn::security::Pib::impl

Definition at line 163 of file pib.hpp.

§ m_scheme

std::string ndn::security::Pib::m_scheme
protected

Definition at line 172 of file pib.hpp.

Referenced by getScheme().

§ m_location

std::string ndn::security::Pib::m_location
protected

Definition at line 173 of file pib.hpp.

§ m_hasDefaultIdentity

bool ndn::security::Pib::m_hasDefaultIdentity
mutableprotected

Definition at line 175 of file pib.hpp.

§ m_defaultIdentity

Identity ndn::security::Pib::m_defaultIdentity
mutableprotected

Definition at line 176 of file pib.hpp.

§ m_needRefreshIdentities

bool ndn::security::Pib::m_needRefreshIdentities
mutableprotected

Definition at line 178 of file pib.hpp.

§ m_identities

IdentityContainer ndn::security::Pib::m_identities
mutableprotected

Definition at line 179 of file pib.hpp.

§ m_impl

shared_ptr<PibImpl> ndn::security::Pib::m_impl
protected

Definition at line 181 of file pib.hpp.

Referenced by getImpl().


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