Container of certificates of a key. More...
#include <certificate-container.hpp>
Classes | |
class | const_iterator |
Public Types | |
using | iterator = const_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 Certificate &certificate) |
Add certificate into the container. More... | |
void | remove (const Name &certName) |
Remove a certificate with certName from the container. More... | |
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, 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< PibImpl > | pibImpl |
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 47 of file certificate-container.hpp.
Definition at line 86 of file certificate-container.hpp.
CertificateContainer::const_iterator ndn::security::pib::CertificateContainer::begin | ( | ) | const |
Definition at line 92 of file certificate-container.cpp.
CertificateContainer::const_iterator ndn::security::pib::CertificateContainer::end | ( | ) | const |
Definition at line 98 of file certificate-container.cpp.
CertificateContainer::const_iterator ndn::security::pib::CertificateContainer::find | ( | const Name & | certName | ) | const |
Definition at line 104 of file certificate-container.cpp.
size_t ndn::security::pib::CertificateContainer::size | ( | ) | const |
Definition at line 110 of file certificate-container.cpp.
void ndn::security::pib::CertificateContainer::add | ( | const Certificate & | certificate | ) |
Add certificate
into the container.
std::invalid_argument | the name of certificate does not match the key name |
Definition at line 116 of file certificate-container.cpp.
References NDN_THROW.
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.
std::invalid_argument | certName does not match the key name |
Definition at line 129 of file certificate-container.cpp.
References ndn::security::v2::extractKeyNameFromCertName(), NDN_THROW, and ndn::Name::toUri().
Referenced by ndn::security::pib::detail::KeyImpl::removeCertificate().
Certificate ndn::security::pib::CertificateContainer::get | ( | const Name & | certName | ) | const |
Get a certificate with certName
from the container.
std::invalid_argument | certName does not match the key name |
Pib::Error | the certificate does not exist |
Definition at line 142 of file certificate-container.cpp.
References ndn::security::v2::extractKeyNameFromCertName(), NDN_THROW, 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 |
Check if the container is consistent with the backend storage.
Definition at line 159 of file certificate-container.cpp.
Referenced by ndn::security::pib::detail::KeyImpl::addCertificate(), ndn::security::pib::detail::KeyImpl::getCertificate(), ndn::security::pib::detail::KeyImpl::getCertificates(), ndn::security::pib::detail::KeyImpl::getDefaultCertificate(), ndn::security::pib::detail::KeyImpl::removeCertificate(), and ndn::security::pib::detail::KeyImpl::setDefaultCertificate().
|
inline |
Definition at line 138 of file certificate-container.hpp.
|
inline |
Definition at line 144 of file certificate-container.hpp.
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::pib::CertificateContainer::__pad0__ |
Definition at line 135 of file certificate-container.hpp.
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE shared_ptr<PibImpl> ndn::security::pib::CertificateContainer::pibImpl |
Definition at line 135 of file certificate-container.hpp.
Referenced by ndn::security::pib::CertificateContainer::const_iterator::operator!=().