ndn::security::pib::CertificateContainer Class Reference

Container of certificates of a key. More...

#include <ndn-cxx/security/pib/certificate-container.hpp>

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

Classes

class  const_iterator
 

Public Types

using iterator = const_iterator
 

Public Member Functions

void add (const Certificate &certificate)
 Add certificate into the container. More...
 
const_iterator begin () const noexcept
 
bool empty () const noexcept
 Check whether the container is empty. More...
 
const_iterator end () const noexcept
 
const_iterator find (const Name &certName) const
 
Certificate get (const Name &certName) const
 Return a certificate by name. More...
 
bool isConsistent () const
 Check if the container is consistent with the backend storage. More...
 
void remove (const Name &certName)
 Remove a certificate with certName from the container. More...
 
size_t size () const noexcept
 Return the number of certificates in the container. More...
 

Detailed Description

Container of certificates of a key.

The container is used to search/enumerate the certificates of a key. It can be created only by the KeyImpl private class.

See also
Key::getCertificates()

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

Member Typedef Documentation

◆ iterator

Member Function Documentation

◆ add()

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

Add certificate into the container.

Exceptions
std::invalid_argumentThe name of certificate does not match the key name.

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

◆ begin()

const_iterator ndn::security::pib::CertificateContainer::begin ( ) const
inlinenoexcept

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

◆ empty()

bool ndn::security::pib::CertificateContainer::empty ( ) const
inlinenoexcept

Check whether the container is empty.

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

◆ end()

const_iterator ndn::security::pib::CertificateContainer::end ( ) const
inlinenoexcept

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

◆ find()

CertificateContainer::const_iterator ndn::security::pib::CertificateContainer::find ( const Name certName) const

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

◆ get()

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

Return a certificate by name.

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

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

◆ isConsistent()

bool ndn::security::pib::CertificateContainer::isConsistent ( ) const

Check if the container is consistent with the backend storage.

Note
This method is heavyweight and should be used in debugging mode only.

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

◆ remove()

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 90 of file certificate-container.cpp.

◆ size()

size_t ndn::security::pib::CertificateContainer::size ( ) const
inlinenoexcept

Return the number of certificates in the container.

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