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

Container of certificates of a key. More...

#include <certificate-container.hpp>

Inheritance diagram for ndn::security::pib::CertificateContainer:
Collaboration diagram for ndn::security::pib::CertificateContainer:

Classes

class  const_iterator
 

Public Types

typedef const_iterator iterator
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
const_iterator find (const Name &certName) const
 
size_t size () const
 
void add (const v2::Certificate &certificate)
 Add certificate into the container. More...
 
void remove (const Name &certName)
 Remove a certificate with certName from the container. More...
 
v2::Certificate get (const Name &certName) const
 Get a certificate with certName from the container. More...
 
bool isConsistent () const
 Check if the container is consistent with the backend storage. More...
 
const std::set< Name > & getCertNames () const
 
const std::unordered_map< Name, v2::Certificate > & getCache () const
 

Public Attributes

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE __pad0__: CertificateContainer(const Name& keyName
 
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE shared_ptr< PibImplpibImpl
 

Friends

class detail::KeyImpl
 

Detailed Description

Container of certificates of a key.

The container is used to search/enumerate certificates of a key. The container can be created only by detail::KeyImpl.

Definition at line 46 of file certificate-container.hpp.

Member Typedef Documentation

Member Function Documentation

CertificateContainer::const_iterator ndn::security::pib::CertificateContainer::begin ( ) const
CertificateContainer::const_iterator ndn::security::pib::CertificateContainer::end ( ) const
CertificateContainer::const_iterator ndn::security::pib::CertificateContainer::find ( const Name certName) const
size_t ndn::security::pib::CertificateContainer::size ( ) const

Definition at line 110 of file certificate-container.cpp.

void ndn::security::pib::CertificateContainer::add ( const v2::Certificate certificate)

Add certificate into the container.

Exceptions
std::invalid_argumentthe name of certificate does not match the key name

Definition at line 116 of file certificate-container.cpp.

References ndn::security::v2::Certificate::getKeyName(), ndn::Data::getName(), and ndn::Name::toUri().

Referenced by ndn::security::pib::detail::KeyImpl::addCertificate().

void ndn::security::pib::CertificateContainer::remove ( const Name certName)

Remove a certificate with certName from the container.

Exceptions
std::invalid_argumentcertName does not match the key name

Definition at line 129 of file certificate-container.cpp.

References ndn::security::v2::extractKeyNameFromCertName(), ndn::security::v2::Certificate::isValidName(), and ndn::Name::toUri().

Referenced by ndn::security::pib::detail::KeyImpl::removeCertificate().

v2::Certificate ndn::security::pib::CertificateContainer::get ( const Name certName) const

Get a certificate with certName from the container.

Exceptions
std::invalid_argumentcertName does not match the key name
Pib::Errorthe certificate does not exist

Definition at line 143 of file certificate-container.cpp.

References ndn::security::v2::extractKeyNameFromCertName(), ndn::security::v2::Certificate::isValidName(), and ndn::Name::toUri().

Referenced by ndn::security::pib::detail::KeyImpl::getCertificate(), ndn::security::pib::CertificateContainer::const_iterator::operator*(), and ndn::security::pib::detail::KeyImpl::setDefaultCertificate().

bool ndn::security::pib::CertificateContainer::isConsistent ( ) const
const std::set<Name>& ndn::security::pib::CertificateContainer::getCertNames ( ) const
inline

Definition at line 131 of file certificate-container.hpp.

const std::unordered_map<Name, v2::Certificate>& ndn::security::pib::CertificateContainer::getCache ( ) const
inline

Definition at line 137 of file certificate-container.hpp.

Friends And Related Function Documentation

friend class detail::KeyImpl
friend

Definition at line 150 of file certificate-container.hpp.

Member Data Documentation

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::pib::CertificateContainer::__pad0__

Definition at line 128 of file certificate-container.hpp.

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE shared_ptr<PibImpl> ndn::security::pib::CertificateContainer::pibImpl

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