A PibCertificateContainer is used to search/enumerate the certificates of a key.
More...
#include <pib-certificate-container.hpp>
|
| size_t | size () const |
| | Get the number of certificates in the container. More...
|
| |
| void | add (const CertificateV2 &certificate) |
| | Add certificate into the container. More...
|
| |
| void | remove (const Name &certificateName) |
| | Remove the certificate with name certificateName from the container. More...
|
| |
ptr_lib::shared_ptr
< CertificateV2 > | get (const Name &certificateName) |
| | Get the certificate with certificateName from the container. More...
|
| |
| bool | isConsistent () const |
| | Check if the container is consistent with the backend storage. More...
|
| |
A PibCertificateContainer is used to search/enumerate the certificates of a key.
(A PibCertificateContainer object can only be created by PibKey.)
| void ndn::PibCertificateContainer::add |
( |
const CertificateV2 & |
certificate | ) |
|
Add certificate into the container.
If the certificate already exists, this replaces it.
- Parameters
-
| certificate | The certificate to add. This copies the object. |
- Exceptions
-
| std::invalid_argument | if the name of the certificate does not match the key name. |
| ptr_lib::shared_ptr< CertificateV2 > ndn::PibCertificateContainer::get |
( |
const Name & |
certificateName | ) |
|
Get the certificate with certificateName from the container.
- Parameters
-
| certificateName | The name of the certificate. |
- Returns
- A copy of the certificate.
- Exceptions
-
| std::invalid_argument | if certificateName does not match the key name |
| Pib::Error | if the certificate does not exist. |
| bool ndn::PibCertificateContainer::isConsistent |
( |
| ) |
const |
Check if the container is consistent with the backend storage.
- Returns
- True if the container is consistent, false otherwise.
- Note
- This method is heavy-weight and should be used in a debugging mode only.
| void ndn::PibCertificateContainer::remove |
( |
const Name & |
certificateName | ) |
|
Remove the certificate with name certificateName from the container.
If the certificate does not exist, do nothing.
- Parameters
-
| certificateName | The name of the certificate. |
- Exceptions
-
| std::invalid_argument | if certificateName does not match the key name. |
| size_t ndn::PibCertificateContainer::size |
( |
| ) |
const |
|
inline |
Get the number of certificates in the container.
- Returns
- The number of certificates.
The documentation for this class was generated from the following files: